Commit 3e153d13 by Őry Máté

dashboard: save blank org_id as NULL to bypass unique check

closes #249
parent ac5f3142
...@@ -201,6 +201,11 @@ class Profile(Model): ...@@ -201,6 +201,11 @@ class Profile(Model):
def __unicode__(self): def __unicode__(self):
return self.get_display_name() return self.get_display_name()
def save(self, *args, **kwargs):
if self.org_id == "":
self.org_id = None
super(Profile, self).save(*args, **kwargs)
class Meta: class Meta:
permissions = ( permissions = (
('use_autocomplete', _('Can use autocomplete.')), ('use_autocomplete', _('Can use autocomplete.')),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment