Skip to content

Commit f8d0352

Browse files
authored
notification-hub: tolerate missing gcmCredential in gcm update output (#9495)
* notification-hub: avoid false failure on gcm update output AAZ output shaping no longer requires properties.gcmCredential; return {} when missing to avoid ResourceNotFoundError. * added history
1 parent ef4b266 commit f8d0352

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/notification-hub/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
2.0.0b2
7+
++++++
8+
* Fix notification-hub credential create command output issue
9+
610
2.0.0b1
711
++++++
812
* Remove `az notification-hub test-send`

src/notification-hub/azext_notification_hub/aaz/latest/notification_hub/credential/gcm/_create.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def post_instance_create(self, instance):
9292
pass
9393

9494
def _output(self, *args, **kwargs):
95-
result = self.deserialize_output(self.ctx.selectors.subresource.required(), client_flatten=True)
95+
result = self.deserialize_output(self.ctx.selectors.subresource.get(), client_flatten=True)
96+
if result is None or result == AAZUndefined:
97+
return {}
9698
return result
9799

98100
class SubresourceSelector(AAZJsonSelector):

src/notification-hub/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# TODO: Confirm this is the right version number you want and it matches your
1818
# HISTORY.rst entry.
19-
VERSION = '2.0.0b1'
19+
VERSION = '2.0.0b2'
2020

2121
# The full list of classifiers is available at
2222
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

0 commit comments

Comments
 (0)