Skip to content

Commit

Permalink
fix broken tests on django 5.1.1 / python 3.12
Browse files Browse the repository at this point in the history
failing with exception in
`django.db.models.fields.related_descriptors.ReverseOnToOneDescriptor.__get__`
due to missing `accessor_name` attr/property, which appears to be a
result of
django/django@5e80390
  • Loading branch information
tfh-cri committed Sep 8, 2024
1 parent fac0761 commit 769f379
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions relativity/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ def field(self):
def get_accessor_name(self):
return self.name

@cached_property
def accessor_name(self):
return self.get_accessor_name()

def _get_extra_restriction(self, related_alias, local_alias):
return Restriction(
forward=True,
Expand Down

0 comments on commit 769f379

Please sign in to comment.