mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-12 22:18:25 +02:00
change to foreign key definition in portfolio
This commit is contained in:
parent
01a6257ef4
commit
c17e4e4eaa
2 changed files with 6 additions and 2 deletions
|
@ -73,7 +73,7 @@ class Migration(migrations.Migration):
|
||||||
field=models.ForeignKey(
|
field=models.ForeignKey(
|
||||||
help_text="Associated user",
|
help_text="Associated user",
|
||||||
on_delete=django.db.models.deletion.PROTECT,
|
on_delete=django.db.models.deletion.PROTECT,
|
||||||
related_name="creator",
|
related_name="created_portfolios",
|
||||||
to=settings.AUTH_USER_MODEL,
|
to=settings.AUTH_USER_MODEL,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -24,7 +24,11 @@ class Portfolio(TimeStampedModel):
|
||||||
# Stores who created this model. If no creator is specified in DJA,
|
# Stores who created this model. If no creator is specified in DJA,
|
||||||
# then the creator will default to the current request user"""
|
# then the creator will default to the current request user"""
|
||||||
creator = models.ForeignKey(
|
creator = models.ForeignKey(
|
||||||
"registrar.User", on_delete=models.PROTECT, help_text="Associated user", related_name="creator", unique=False
|
"registrar.User",
|
||||||
|
on_delete=models.PROTECT,
|
||||||
|
help_text="Associated user",
|
||||||
|
related_name="created_portfolios",
|
||||||
|
unique=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
notes = models.TextField(
|
notes = models.TextField(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue