readd missing metadata dict
authorymh <ymh.work@gmail.com>
Fri, 15 Jun 2018 17:05:00 +0200
changeset 8 4b9587be651f
parent 7 023dbfdc9f19
child 9 0bbc852c17c0
readd missing metadata dict
src/iconolab_mcc/management/commands/importimages.py
--- a/src/iconolab_mcc/management/commands/importimages.py	Fri Jun 15 16:45:22 2018 +0200
+++ b/src/iconolab_mcc/management/commands/importimages.py	Fri Jun 15 17:05:00 2018 +0200
@@ -372,6 +372,21 @@
                         item.folders.add(folder)
 
                 else:
+                    new_metadata = {
+                        "authors" : item_authors,
+                        "school" : item_school,
+                        "designation" : item_designation,
+                        "field" : item_field,
+                        "datation" : item_datation,
+                        "technics" : item_technics,
+                        "measurements" : item_measurements,
+                        "create_or_usage_location" : item_create_or_usage_location,
+                        "discovery_context" : item_discovery_context,
+                        "conservation_location" : item_conservation_location,
+                        "photo_credits" : item_photo_credits,
+                        "inventory_number" : item_inventory_number,
+                        "joconde_ref" : item_joconde_ref
+                    }
                     self.create_item_and_metadata(
                         item_joconde_ref, collection, new_metadata, item['SRC_IMG_FILES'], options, self.source_dir, self.target_dir)