diff options
Diffstat (limited to 'catalog/packages/biz/nsdm_subscription.py')
-rw-r--r-- | catalog/packages/biz/nsdm_subscription.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/catalog/packages/biz/nsdm_subscription.py b/catalog/packages/biz/nsdm_subscription.py index 6c5372f7..a94717ab 100644 --- a/catalog/packages/biz/nsdm_subscription.py +++ b/catalog/packages/biz/nsdm_subscription.py @@ -46,6 +46,17 @@ class NsdmSubscription: def __init__(self): pass + def query_single_subscription(self, subscription_id): + logger.debug("Start Query Subscription... ") + subscription = \ + NsdmSubscriptionModel.objects.filter( + subscriptionid=subscription_id) + if not subscription.exists(): + raise ResourceNotFoundException( + "Subscription(%s) doesn't exists" % subscription_id) + logger.debug("Subscription found... ") + return self.fill_resp_data(subscription[0]) + def query_multi_subscriptions(self, query_params): self.params = query_params query_data = {} |