Skip to content
Snippets Groups Projects

Fix metadata loading upon `Resource.objects()`

Closed Niklas Siemer requested to merge dev_nsiemer_objects into master

Given the discussions in !10 (merged) especially !10 (comment 2097758) I tried to get all metadata correctly into the FileObjects. If I saw it correctly, the items of the two dictionaries are in the correct order and can simply be ziped?! If this is not the case, this MR would result in an inconsistent data-metadata-mapping.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • No, I think this isn't possible. I had this in an earlier version (like way before 0.5 or 0.4). The problem is, that the fileStorage contains files without metadata and the metadata storage does not have any entry for those. So you have files A, B, C, D and metadata M_A, M_C, M_D, but B would get M_C and c would get M_D.
    The ordering could also be inconsistent in general I think. It would certainly a lot easier, if it would just be one dict with the fileStorage including the metadata. Or at least identical keys in both dictionaries - and what is it with using lists instead of dicts anways? AFAIK filesnames cannot appear twice, so this is kinda stupid. Hope they'll fix these design decisions with their APIv2... :sweat_smile:

  • Hopefully... Maybe we check the length of both lists and if we have a one to one mapping with path in meta_storage_key we are sure it works out... The keys seem to be somewhat random...

  • closed

  • Niklas Siemer mentioned in merge request !13 (closed)

    mentioned in merge request !13 (closed)

Please register or sign in to reply
Loading