1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #8195: Ensure all GenericForeignKey ID fields employ PositiveBigIntegerField

This commit is contained in:
jeremystretch
2022-01-24 16:02:54 -05:00
parent 5abfe821bc
commit 571e9801f3
12 changed files with 177 additions and 12 deletions

View File

@@ -351,7 +351,7 @@ class ImageAttachment(WebhooksMixin, ChangeLoggedModel):
to=ContentType,
on_delete=models.CASCADE
)
object_id = models.PositiveIntegerField()
object_id = models.PositiveBigIntegerField()
parent = GenericForeignKey(
ct_field='content_type',
fk_field='object_id'
@@ -431,7 +431,7 @@ class JournalEntry(WebhooksMixin, ChangeLoggedModel):
to=ContentType,
on_delete=models.CASCADE
)
assigned_object_id = models.PositiveIntegerField()
assigned_object_id = models.PositiveBigIntegerField()
assigned_object = GenericForeignKey(
ct_field='assigned_object_type',
fk_field='assigned_object_id'