Skip to content

Commit

Permalink
Remove unused field url_frag
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb committed Apr 2, 2024
1 parent 85e1678 commit 7592219
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion api/api/models/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ class Meta:

class AudioReport(AbstractMediaReport):
media_class = Audio
url_frag = "audio"

media_obj = models.ForeignKey(
to="Audio",
Expand Down
1 change: 0 additions & 1 deletion api/api/models/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ class Meta:

class ImageReport(AbstractMediaReport):
media_class = Image
url_frag = "images"

media_obj = models.ForeignKey(
to="Image",
Expand Down
4 changes: 1 addition & 3 deletions api/api/models/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,11 @@ class AbstractMediaReport(models.Model):
Generic model from which to inherit all reported media classes.
'Reported' here refers to content reports such as sensitive, copyright-violating or
deleted content. Subclasses must populate fields ``media_class`` and ``url_frag``.
deleted content. Subclasses must populate the field ``media_class``.
"""

media_class: type[models.Model] = None
"""the model class associated with this media type e.g. ``Image`` or ``Audio``"""
url_frag: str = None
"""the fragment used in the URL path for the media item e.g. ``images`` or ``audio``"""

REPORT_CHOICES = [(MATURE, MATURE), (DMCA, DMCA), (OTHER, OTHER)]

Expand Down

0 comments on commit 7592219

Please sign in to comment.