In mobile-api model PLATFORM_CLASSES tuple of list and make migrations generate new migration due to different order.
This commit is contained in:
Awais Qureshi
2020-01-10 14:01:56 +05:00
parent e7f112c61c
commit 48dbebd28f

View File

@@ -43,10 +43,10 @@ class AppVersionConfig(models.Model):
.. no_pii:
"""
PLATFORM_CHOICES = tuple([
(platform, platform)
for platform in PLATFORM_CLASSES.keys()
])
PLATFORM_CHOICES = tuple(
[(platform, platform) for platform in sorted(PLATFORM_CLASSES.keys())]
)
platform = models.CharField(max_length=50, choices=PLATFORM_CHOICES, blank=False)
version = models.CharField(
max_length=50,