Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
c997bd09
Verified
Commit
c997bd09
authored
Nov 02, 2021
by
Baptiste Beauplat
Browse files
Remove package check from initial distribution dataset
As per the model definition, project can't be None.
parent
c2e6452d
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/packages/migrations/0001_initial.py
View file @
c997bd09
...
...
@@ -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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment