Skip to content

Commit

Permalink
Azure: Add missing alias for dateOffset
Browse files Browse the repository at this point in the history
This commit adds a missing alias for the `date_offset` property on
`DeprecationSchedule`. Without this alias the class was unable to
properly parse the value from JSON, which may cause the following error
when senting the request to configure:

```
'badRequest', 'message': "The deprecation schedule for image 'X.Y.|' of type 'ARCH' is already published and can not be changed in draft."
```

Refers to SPMM-18578
  • Loading branch information
JAVGan committed Dec 19, 2024
1 parent f5a129c commit 849afd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudpub/models/ms_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class DeprecationSchedule(AttrsJSONDecodeMixin):
"""The date for deprecation."""

date_offset: Optional[str] = field(
validator=optional(instance_of(str)), metadata={"hide_unset": True}
validator=optional(instance_of(str)), metadata={"hide_unset": True, "alias": "dateOffset"}
)
"""The date offset for deprecation."""

Expand Down

0 comments on commit 849afd5

Please sign in to comment.