Shepherd icon indicating copy to clipboard operation
Shepherd copied to clipboard

Error when deleting a domain

Open chervaliery opened this issue 4 years ago • 0 comments

There is an error when on tries to delete a domain.

Internal Server Error: /admin/catalog/domain/
...
  File "/opt/Shepherd/catalog/models.py", line 193, in __str__
    return f'{self.client} {self.project.project_type} - {self.domain.name} ({self.activitytype.activity}) {self.start_date} to {self.end_date} - {self.o
perator}'
AttributeError: 'History' object has no attribute 'project'

The line https://github.com/GhostManager/Shepherd/blob/dfba838ec4f5713110d8b1afd8b060734dfea9d0/catalog/models.py#L193

Should be changed with

        return f'{self.client} {self.project_type.project_type} - {self.domain.name} ({self.activity_type.activity}) {self.start_date} to {self.end_date} - {self.operator}'

I'll send a PR to fix it.

chervaliery avatar Apr 08 '20 14:04 chervaliery