Fix fixture, for realsies

This commit is contained in:
Gabriel Augendre 2022-11-01 09:57:21 +01:00
parent d619aacf64
commit 22832adcb0
2 changed files with 7281 additions and 129 deletions

File diff suppressed because it is too large Load diff

View file

@ -77,8 +77,8 @@ class Path(DocumentedModel, UniquelyNamedModel, TimeStampedModel, models.Model):
class CapabilityManager(models.Manager):
def get_by_natural_key(self, path_id, rank):
return self.get(path_id=path_id, rank=rank)
def get_by_natural_key(self, path, rank):
return self.get(path=path, rank=rank)
class Capability(DocumentedModel, TimeStampedModel, models.Model):
@ -100,7 +100,7 @@ class Capability(DocumentedModel, TimeStampedModel, models.Model):
)
description = models.TextField(verbose_name="description")
objects = CapabilityManager
objects = CapabilityManager()
class Meta:
constraints = [models.UniqueConstraint("path", "rank", name="unique_path_rank")]