Verified Commit c997bd09 authored by Baptiste Beauplat's avatar Baptiste Beauplat
Browse files

Remove package check from initial distribution dataset

As per the model definition, project can't be None.
parent c2e6452d
......@@ -59,13 +59,11 @@ def create_distributions(apps, schema_editor):
Project = apps.get_model('packages', 'Project')
for name, project in DISTRIBUTIONS:
project, _ = Project.objects.get_or_create(name=project)
distribution = Distribution()
if project:
project, _ = Project.objects.get_or_create(name=project)
distribution.name = name
distribution.project = project
distribution.full_clean()
distribution.save()
......
Supports Markdown
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