Skip to content

Commit

Permalink
docs: remove a couple more todos
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdh committed Nov 10, 2023
1 parent d273d8a commit 1232c85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dataimporter/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ def transform(self, base_record: SourceRecord, data: dict):
media = self.get_foreign_record_data(base_record)
if media:
existing_media = data.get(MediaLink.MEDIA_TARGET_FIELD, [])
# TODO: could we order in a more useful way, e.g. category?
# order by media ID
data[MediaLink.MEDIA_TARGET_FIELD] = sorted(
chain(existing_media, media), key=itemgetter("_id")
)
# TODO: integer?
data[MediaLink.MEDIA_COUNT_TARGET_FIELD] = len(existing_media) + len(media)


Expand Down

0 comments on commit 1232c85

Please sign in to comment.