mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-03-17 23:13:57 +01:00
Merge pull request #145 from eitchtee/dev
feat(import:v1): allow to source previously mapped data by prefixing it with "__"
This commit is contained in:
@@ -490,9 +490,16 @@ class ImportService:
|
||||
|
||||
if isinstance(mapping.source, str):
|
||||
value = row.get(mapping.source, None)
|
||||
|
||||
if not value and mapping.source.startswith("__"):
|
||||
value = mapped_data.get(mapping.source[2:], None)
|
||||
elif isinstance(mapping.source, list):
|
||||
for source in mapping.source:
|
||||
value = row.get(source, None)
|
||||
|
||||
if not value and source.startswith("__"):
|
||||
value = mapped_data.get(source[2:], None)
|
||||
|
||||
if value:
|
||||
break
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user