Skip to content

Commit

Permalink
Add some much-needed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Pithikos committed Oct 7, 2021
1 parent 73bc443 commit 564b016
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/licences/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class HMRCIntegrationUsageData(TimestampableModel):


class Licence(TimestampableModel):
"""
A licence issued to an exporter application
"""
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
reference_code = models.CharField(max_length=30, unique=True, editable=False)
case = models.ForeignKey(Case, on_delete=models.CASCADE, null=False, blank=False, related_name="licences")
Expand Down Expand Up @@ -79,6 +82,7 @@ def save(self, *args, **kwargs):
send_status_change_to_hmrc = kwargs.pop("send_status_change_to_hmrc", False)
super(Licence, self).save(*args, **kwargs)

# Immediately notify HMRC if needed
if LITE_HMRC_INTEGRATION_ENABLED and send_status_change_to_hmrc and self.status != LicenceStatus.DRAFT:
self.send_to_hmrc_integration()

Expand Down

0 comments on commit 564b016

Please sign in to comment.