diff --git a/src/main/java/org/olat/ims/qti/qpool/QTIImportProcessor.java b/src/main/java/org/olat/ims/qti/qpool/QTIImportProcessor.java
index 7ac97cce65bfd7b7ed4cf6a634c1b7b6caa3de15..117f6508bb282d3a4cd32e3f2534940ad366f0ff 100644
--- a/src/main/java/org/olat/ims/qti/qpool/QTIImportProcessor.java
+++ b/src/main/java/org/olat/ims/qti/qpool/QTIImportProcessor.java
@@ -245,9 +245,11 @@ class QTIImportProcessor {
 		}
 		if(metadata != null) {
 			processItemMetadata(poolItem, metadata);
-			createLicense(poolItem, metadata);
 		}
 		questionItemDao.persist(owner, poolItem);
+		if(metadata != null) {
+			createLicense(poolItem, metadata);
+		}
 		return poolItem;
 	}