mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 22:16:00 -03:30
provide the timezone so that the UI doesn't have to
this will also ensure that UI doesn't use a different front end library that will yield different results than the underlying Python code
This commit is contained in:
committed by
Jared Tabor
parent
e5dd3a9626
commit
fbe2391b86
@@ -4511,9 +4511,14 @@ class SchedulePreviewSerializer(BaseSerializer):
|
||||
class ScheduleSerializer(LaunchConfigurationBaseSerializer, SchedulePreviewSerializer):
|
||||
show_capabilities = ['edit', 'delete']
|
||||
|
||||
timezone = serializers.SerializerMethodField()
|
||||
|
||||
class Meta:
|
||||
model = Schedule
|
||||
fields = ('*', 'unified_job_template', 'enabled', 'dtstart', 'dtend', 'rrule', 'next_run',)
|
||||
fields = ('*', 'unified_job_template', 'enabled', 'dtstart', 'dtend', 'rrule', 'next_run', 'timezone',)
|
||||
|
||||
def get_timezone(self, obj):
|
||||
return obj.timezone
|
||||
|
||||
def get_related(self, obj):
|
||||
res = super(ScheduleSerializer, self).get_related(obj)
|
||||
|
||||
Reference in New Issue
Block a user