def map_field2write(self, field2write):
res = {}
field_names = self._get_fieldnames()
for fn in field2write.keys():
if fn not in field_names:
continue
else:
res[field_names[fn]] = field2write[fn]
return res
what is the error?
I tried if condition, but still error.