diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/models.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py index f7d4c2c3..7cd00bff 100644 --- a/main/models.py +++ b/main/models.py @@ -266,6 +266,17 @@ class Package(models.Model): deps.append({'dep': dep, 'pkg': pkg}) return deps +class Signoff(models.Model): + pkg = models.ForeignKey(Package) + pkgver = models.CharField(maxlength=255) + pkgrel = models.CharField(maxlength=255) + signed_off = models.ManyToManyField(User) + + def is_approved(self): + if signed_off.all().count() > 2: + return True + return False + class PackageFile(models.Model): id = models.AutoField(primary_key=True) pkg = models.ForeignKey('Package') |