Rename ImageAttachment.content_type to object_type

This commit is contained in:
Jeremy Stretch
2024-03-01 16:34:52 -05:00
parent ce6b2666a9
commit e0165539b3
11 changed files with 51 additions and 34 deletions

View File

@@ -318,11 +318,11 @@ class ImageAttachmentFilterSet(BaseFilterSet):
label=_('Search'),
)
created = django_filters.DateTimeFilter()
content_type = ContentTypeFilter()
object_type = ContentTypeFilter()
class Meta:
model = ImageAttachment
fields = ['id', 'content_type_id', 'object_id', 'name']
fields = ['id', 'object_type_id', 'object_id', 'name']
def search(self, queryset, name, value):
if not value.strip():