Web schedules overrides are the higher priority level (#1115)

Related to https://github.com/grafana/oncall-private/issues/1550
This commit is contained in:
Matias Bordese 2023-01-13 08:58:35 -03:00 committed by GitHub
parent 71188a895e
commit 0d38fe2a7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -138,7 +138,7 @@ class OnCallShiftSerializer(EagerLoadingMixin, serializers.ModelSerializer):
for field in fields_to_update_for_overrides:
value = None
if field == "priority_level":
value = 0
value = 99
elif field == "rotation_start":
value = validated_data["start"]
validated_data[field] = value

View file

@ -67,7 +67,7 @@ def test_create_on_call_shift_override(on_call_shift_internal_api_setup, make_us
"title": "Test Shift Override",
"type": CustomOnCallShift.TYPE_OVERRIDE,
"schedule": schedule.public_primary_key,
"priority_level": 0,
"priority_level": 99,
"shift_start": start_date.strftime("%Y-%m-%dT%H:%M:%SZ"),
"shift_end": (start_date + timezone.timedelta(hours=2)).strftime("%Y-%m-%dT%H:%M:%SZ"),
"rotation_start": start_date.strftime("%Y-%m-%dT%H:%M:%SZ"),