Remove DynamicSetting usage for mobile app backend on OSS (#1204)

# What this PR does
Make so there's no need to populate `mobile_app_settings` DynamicSetting
when using the OSS license to turn on the mobile app backend.
This commit is contained in:
Vadim Stepanov 2023-01-24 13:53:54 +00:00 committed by GitHub
parent 3bc593cdb2
commit cf1a1cd7f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,6 +53,10 @@ class MobileAppBackend(BaseMessagingBackend):
@staticmethod
def is_enabled_for_organization(organization):
# Setting FEATURE_MOBILE_APP_INTEGRATION_ENABLED to True is enough to enable mobile app on OSS instances
if settings.LICENSE == settings.OPEN_SOURCE_LICENSE_NAME:
return True
mobile_app_settings, _ = DynamicSetting.objects.get_or_create(
name="mobile_app_settings", defaults={"json_value": {"org_ids": []}}
)