--- a/src/iconolab_mcc/management/commands/importimages.py Thu Jul 05 12:43:26 2018 +0200
+++ b/src/iconolab_mcc/management/commands/importimages.py Tue Jun 26 16:22:54 2018 +0200
@@ -343,7 +343,7 @@
item_photo_credits = item['PHOT']
item_inventory_number = item['INV']
item_joconde_ref = item['REF']
- natural_key="%s|%s" % (collection.name,item_joconde_ref)
+ natural_key = ItemMetadata.get_natural_key(collection, item_joconde_ref)
if ItemMetadata.objects.filter(item__collection=collection, natural_key=natural_key).exists():
print('#### An item with ' +
item['REF']+' for natural key, already exists in database in the import collection')