feat: Add management command software

allows setting software as global and migrating to global organization

!11 #27
This commit is contained in:
2024-05-25 15:19:29 +09:30
parent f36400dbb9
commit 395f24f22c
6 changed files with 88 additions and 2 deletions

View File

@ -26,7 +26,17 @@ class AppSettingsCommonFields(models.Model):
class AppSettings(AppSettingsCommonFields, SaveHistory):
""" Application Settings
This model is for storing settings for the application as a whole
This class contains field `owner_organization` which exists so that in the future
if there is a requirement for orgnizational settings, that this table can be used by
specifying the `owner_organization`
Raises:
ValidationError: When software set as global and no organization has been specified
"""
owner_organization = models.ForeignKey(
Organization,
@ -65,4 +75,3 @@ class AppSettings(AppSettingsCommonFields, SaveHistory):
'software_is_global',
'global_organization',
]