Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
steering
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
AURA
steering
Commits
75e237b0
Commit
75e237b0
authored
2 years ago
by
Ernesto Rico Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Remove is_repetition field from, add repetition_of field serializer.
parent
9c1dca98
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
program/serializers.py
+5
-5
5 additions, 5 deletions
program/serializers.py
with
5 additions
and
5 deletions
program/serializers.py
+
5
−
5
View file @
75e237b0
...
...
@@ -509,7 +509,7 @@ class CollisionSerializer(serializers.Serializer):
playlist_id
=
serializers
.
IntegerField
(
allow_null
=
True
)
show
=
serializers
.
IntegerField
()
show_name
=
serializers
.
CharField
()
is_
repetition
=
serializers
.
BooleanField
(
)
repetition
_of
=
serializers
.
IntegerField
(
allow_null
=
True
)
schedule
=
serializers
.
IntegerField
()
memo
=
serializers
.
CharField
()
note_id
=
serializers
.
IntegerField
(
allow_null
=
True
)
...
...
@@ -536,7 +536,7 @@ class DryRunTimeSlotSerializer(serializers.Serializer):
playlist_id
=
serializers
.
IntegerField
(
allow_null
=
True
)
start
=
serializers
.
DateField
()
end
=
serializers
.
DateField
()
is_
repetition
=
serializers
.
BooleanField
(
)
repetition
_of
=
serializers
.
IntegerField
(
allow_null
=
True
)
memo
=
serializers
.
CharField
()
...
...
@@ -570,6 +570,7 @@ class ScheduleDryRunResponseSerializer(serializers.Serializer):
class
TimeSlotSerializer
(
serializers
.
ModelSerializer
):
show
=
serializers
.
PrimaryKeyRelatedField
(
queryset
=
Show
.
objects
.
all
())
schedule
=
serializers
.
PrimaryKeyRelatedField
(
queryset
=
Schedule
.
objects
.
all
())
repetition_of
=
serializers
.
PrimaryKeyRelatedField
(
queryset
=
TimeSlot
.
objects
.
all
())
class
Meta
:
model
=
TimeSlot
...
...
@@ -579,7 +580,6 @@ class TimeSlotSerializer(serializers.ModelSerializer):
"
start
"
,
"
end
"
,
"
memo
"
,
"
is_repetition
"
,
"
playlist_id
"
,
"
note_id
"
,
)
...
...
@@ -593,8 +593,8 @@ class TimeSlotSerializer(serializers.ModelSerializer):
# Only save certain fields
instance
.
memo
=
validated_data
.
get
(
"
memo
"
,
instance
.
memo
)
instance
.
is_
repetition
=
validated_data
.
get
(
"
is_
repetition
"
,
instance
.
is_
repetition
instance
.
repetition
_of
=
validated_data
.
get
(
"
repetition
_of
"
,
instance
.
repetition
_of
)
instance
.
playlist_id
=
validated_data
.
get
(
"
playlist_id
"
,
instance
.
playlist_id
)
instance
.
save
()
...
...
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