From 517e3c2bf8d34d8d71d3974634963a0e6e76c305 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 12 May 2021 15:58:07 +0300 Subject: Fix manage check errors --- servo/models/common.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'servo/models/common.py') diff --git a/servo/models/common.py b/servo/models/common.py index 81e6855..f92485e 100644 --- a/servo/models/common.py +++ b/servo/models/common.py @@ -99,6 +99,7 @@ class FlaggedItem(models.Model): ref_id = models.IntegerField() flagged_by = models.ForeignKey( settings.AUTH_USER_MODEL, + null=True, on_delete=models.SET_NULL ) @@ -113,6 +114,7 @@ class Event(models.Model): description = models.CharField(max_length=255) triggered_by = models.ForeignKey( settings.AUTH_USER_MODEL, + null=True, on_delete=models.SET_NULL) triggered_at = models.DateTimeField(auto_now_add=True) handled_at = models.DateTimeField(null=True) @@ -173,7 +175,7 @@ class GsxAccount(models.Model): ) timezone = models.CharField( - max_length=4, + max_length=8, default='CEST', verbose_name=_('Timezone'), choices=gsxws.GSX_TIMEZONES @@ -288,7 +290,7 @@ class GsxAccount(models.Model): ordering = ['title'] verbose_name = _("GSX Account") verbose_name_plural = _("GSX Accounts") - unique_together = ('sold_to', 'ship_to', 'environment', 'site',) + unique_together = ('sold_to', 'ship_to', 'environment',) class Tag(MPTTModel): @@ -438,7 +440,7 @@ class Location(models.Model): ) gsx_tz = models.CharField( - max_length=4, + max_length=8, default='CEST', verbose_name=_('Timezone'), choices=gsxws.GSX_TIMEZONES @@ -517,7 +519,6 @@ class Location(models.Model): get_latest_by = 'id' verbose_name = _('Location') verbose_name_plural = _('Locations') - unique_together = ('title', 'site',) class Configuration(models.Model): @@ -641,7 +642,6 @@ class Configuration(models.Model): class Meta: app_label = 'servo' - unique_together = ('key', 'site',) class Property(models.Model): -- cgit v1.2.3