Skip to content

Commit

Permalink
don't require context type fields (which are often blank)
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Sep 26, 2019
1 parent 4461dc5 commit d3411ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pinax/referrals/models.py
Expand Up @@ -156,8 +156,8 @@ class ReferralResponse(models.Model):
ip_address = models.CharField(max_length=45)
action = models.CharField(max_length=128)

target_content_type = models.ForeignKey(ContentType, null=True, on_delete=models.SET_NULL)
target_object_id = models.PositiveIntegerField(null=True)
target_content_type = models.ForeignKey(ContentType, null=True, blank=True, on_delete=models.SET_NULL)
target_object_id = models.PositiveIntegerField(null=True, blank=True)
target = GenericForeignKey(
ct_field="target_content_type",
fk_field="target_object_id"
Expand Down

0 comments on commit d3411ee

Please sign in to comment.