Set default values so it's actually possible to request new repositories
authorMagnus Hagander <magnus@hagander.net>
Mon, 30 May 2016 11:46:58 +0000 (13:46 +0200)
committerMagnus Hagander <magnus@hagander.net>
Mon, 30 May 2016 11:46:58 +0000 (13:46 +0200)
The handling must've changed when we upgraded to django 1.8, and somehow
we managed to miss that in testing.

Noted by Devrim Gunduz.

gitadmin/gitadmin/adm/models.py

index 5825ffa843d4ec08a4114d3e6bcbb9ea04a5af9a..8c9d8467f0922a804a0e68673ad427a0e24edf8c 100644 (file)
@@ -34,9 +34,9 @@ class Repository(models.Model):
        repoid = models.AutoField(blank=False, primary_key=True)
        name = models.CharField(max_length=64, blank=False, unique=True)
        description = models.TextField(max_length=1024, blank=False)
-       anonymous = models.BooleanField(blank=False,verbose_name='Enable anonymous access')
-       web = models.BooleanField(blank=False,verbose_name='Enable gitweb access')
-       approved = models.BooleanField(blank=False)
+       anonymous = models.BooleanField(blank=False,default=False,verbose_name='Enable anonymous access')
+       web = models.BooleanField(blank=False,default=False,verbose_name='Enable gitweb access')
+       approved = models.BooleanField(blank=False, default=False)
        tabwidth = models.IntegerField(default=8, null=False)
        initialclone = models.CharField(max_length=256, blank=True, null=True)
        remoterepository = models.ForeignKey(RemoteRepository, null=True, blank=True,