Commit aa27b0a2 authored by Hubert Denkmair's avatar Hubert Denkmair
Browse files

allow to disable snakeversion in django admin

parent 658f9947
......@@ -44,7 +44,7 @@ class SnakeVersion(models.Model):
class UserProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
viewer_key = models.BigIntegerField(unique=True)
active_snake = models.ForeignKey(SnakeVersion, null=True, on_delete=models.SET_NULL)
active_snake = models.ForeignKey(SnakeVersion, null=True, blank=True, on_delete=models.SET_NULL)
def save(self, *args, **kwargs):
if not self.viewer_key:
......
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 to comment