Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Commits
ae8a273e
Commit
ae8a273e
authored
11 months ago
by
Carlos Vega
Browse files
Options
Downloads
Patches
Plain Diff
make pep happy
parent
e2668ea2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!445
Support for Python 3.11
Pipeline
#88336
passed
11 months ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
smash/web/api_views/subject.py
+1
-1
1 addition, 1 deletion
smash/web/api_views/subject.py
smash/web/utils.py
+4
-2
4 additions, 2 deletions
smash/web/utils.py
with
5 additions
and
3 deletions
smash/web/api_views/subject.py
+
1
−
1
View file @
ae8a273e
...
...
@@ -771,7 +771,7 @@ def subjects(request: WSGIRequest, subject_list_type: str) -> HttpResponse:
if
length
==
-
1
:
sliced_subjects
=
ordered_subjects
else
:
sliced_subjects
=
ordered_subjects
[
start
:
(
start
+
length
)]
sliced_subjects
=
ordered_subjects
[
start
:
(
start
+
length
)]
result_subjects
=
sliced_subjects
...
...
This diff is collapsed.
Click to expand it.
smash/web/utils.py
+
4
−
2
View file @
ae8a273e
...
...
@@ -11,14 +11,15 @@ from django.utils.text import capfirst
from
web.algorithm
import
VerhoeffAlgorithm
,
LuhnAlgorithm
def
strtobool
(
val
):
def
strtobool
(
val
):
"""
Convert a string representation of truth to true (1) or false (0).
True values are
'
y
'
,
'
yes
'
,
'
t
'
,
'
true
'
,
'
on
'
, and
'
1
'
; false values
are
'
n
'
,
'
no
'
,
'
f
'
,
'
false
'
,
'
off
'
, and
'
0
'
. Raises ValueError if
'
val
'
is anything else.
From distutils lib
From distutils lib
.
"""
val
=
val
.
lower
()
if
val
in
(
'
y
'
,
'
yes
'
,
'
t
'
,
'
true
'
,
'
on
'
,
'
1
'
):
...
...
@@ -28,6 +29,7 @@ def strtobool (val):
else
:
raise
ValueError
(
f
"
invalid truth value
{
val
}
"
)
def
get_deleted_objects
(
objs
:
List
[
models
.
Model
]):
collector
=
NestedObjects
(
using
=
'
default
'
)
collector
.
collect
(
objs
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment