X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/blobdiff_plain/7b81e5b475df21928e13b93cec8de59a6184d280..7dd54abfa2b9d1275fffc814fd4f62a43f30ef84:/wrpylib/wrmwmarkup.py?ds=inline diff --git a/wrpylib/wrmwmarkup.py b/wrpylib/wrmwmarkup.py index f0919de..f705fec 100644 --- a/wrpylib/wrmwmarkup.py +++ b/wrpylib/wrmwmarkup.py @@ -112,9 +112,8 @@ def inn_from_gasthausbox(value, inn): def inn_to_gasthausbox(inn): """Converts an inn class to a dict of Gasthausbox properties. value is an Inn instance.""" def convfromdb(value, key): - if value is None: - return None - return GASTHAUSBOX_DICT[key].from_str(value) + v = '' if value is None else value + return GASTHAUSBOX_DICT[key].from_str(v) value = collections.OrderedDict() value['Position'] = LonLat(inn.position_longitude, inn.position_latitude) value['Höhe'] = inn.position_elevation