| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """ Something here """ |
||
| 66 | 1 | class RawUUIDModel(models.Model): |
|
| 67 | 1 | uuid = models.CharField( |
|
| 68 | blank=True, |
||
| 69 | db_index=True, |
||
| 70 | null=True, |
||
| 71 | max_length=36, |
||
| 72 | unique=True, |
||
| 73 | editable=False, |
||
| 74 | verbose_name=_('QRCode'), |
||
| 75 | ) |
||
| 76 | |||
| 77 | 1 | class Meta: |
|
| 78 | 1 | abstract = True |
|
| 79 | |||
| 80 | def __str__(self): |
||
| 81 | return self.uuid |
||
| 82 | |||
| 83 | 1 | def save(self, *args, **kwargs): |
|
| 84 | 1 | if not self.uuid: |
|
| 85 | 1 | self.uuid = str(uuid4()) |
|
| 86 | return super().save(*args, **kwargs) |
||
| 87 |