"""Logic related notifications.""" from owsresponse import response from users.constants import LABEL_PROFILE from users.models import ows_notifications def unsubscribe_labelprofile(profile_id, vendor_id, subaccount_id=None): """Unsubscribe this labelProfile from this vendor/subaccount.""" if not vendor_id and not subaccount_id: return response.Response() return ows_notifications.unsubscribe_label(profile_id, LABEL_PROFILE, vendor_id, subaccount_id) def subscribe_labelprofile(profile_id, vendor_id, subaccount_id=None): """Subscribe this labelProfile from this vendor/subaccount.""" if not vendor_id and not subaccount_id: return response.Response() return ows_notifications.subscribe_label( profile_id, LABEL_PROFILE, vendor_id, subaccount_id, True )