Skip to content

Commit be85256

Browse files
osaid-rGallaecio
andauthored
Refactoring
Co-authored-by: Adrián Chaves <adrian@chaves.io>
1 parent ba0026f commit be85256

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

extruct/uniform.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ def _uopengraph(extracted, with_og_array=False):
1414
elif v and v.strip():
1515
# If og_array isn't required add first non empty value
1616
if not with_og_array:
17-
flattened[k] = flattened[k] if flattened[k] and flattened[k].strip() else v
17+
if not flattened[k] or not flattened[k].strip():
18+
flattened[k] = v
1819
else:
1920
if isinstance(flattened[k], list):
2021
flattened[k].append(v)

0 commit comments

Comments
 (0)