summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjelle van der Waa <jelle@vdwaa.nl>2019-04-28 16:43:05 +0200
committerGitHub <noreply@github.com>2019-04-28 16:43:05 +0200
commit3db2750f3b1a5a0358d7c746ab1405c29a343f95 (patch)
tree44768ac34d90746bc1cc5e85eb10b58cd6f5a425
parent55f59f4ffaa331cd0cf9674f0ee18daf123a75ad (diff)
parent4002ddb99862d65b582383cdac2725cc1a128b88 (diff)
downloadarchweb-3db2750f3b1a5a0358d7c746ab1405c29a343f95.tar.gz
archweb-3db2750f3b1a5a0358d7c746ab1405c29a343f95.zip
Merge pull request #217 from jelly/kde_unstable_testing
Kde unstable testing
-rw-r--r--main/migrations/0002_repo_public_testing.py18
-rw-r--r--main/models.py7
2 files changed, 22 insertions, 3 deletions
diff --git a/main/migrations/0002_repo_public_testing.py b/main/migrations/0002_repo_public_testing.py
new file mode 100644
index 00000000..3f87234e
--- /dev/null
+++ b/main/migrations/0002_repo_public_testing.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.2 on 2019-04-28 14:23
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('main', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='repo',
+ name='public_testing',
+ field=models.BooleanField(default=False, help_text='Is this repo meant for package testing (without signoffs)?'),
+ ),
+ ]
diff --git a/main/models.py b/main/models.py
index c033a079..094e80a9 100644
--- a/main/models.py
+++ b/main/models.py
@@ -65,6 +65,8 @@ class Repo(models.Model):
name = models.CharField(max_length=255, unique=True)
testing = models.BooleanField(default=False,
help_text="Is this repo meant for package testing?")
+ public_testing = models.BooleanField(default=False,
+ help_text="Is this repo meant for package testing (without signoffs)?")
staging = models.BooleanField(default=False,
help_text="Is this repo meant for package staging?")
bugs_project = models.SmallIntegerField(default=1,
@@ -397,9 +399,8 @@ class Package(models.Model):
if self.repo.testing:
return None
try:
- # Kde-unstable is also a [testing] repo so sort on id.
- return Package.objects.filter(repo__testing=True,
- pkgname=self.pkgname, arch=self.arch).order_by('-id').first()
+ return Package.objects.normal().get(repo__testing=True,
+ pkgname=self.pkgname, arch=self.arch)
except Package.DoesNotExist:
return None