from datetime import date import geruecht.controller.databaseController as dc from geruecht.logger import getDebugLogger db = dc.DatabaseController() debug = getDebugLogger() class Base: def setNewRegistration(self, data): debug.info("set new registration {{ {} }}".format(data)) data['birthDate'] = date(int(data['birthDate']['year']), int(data['birthDate']['month']), int(data['birthDate']['day'])) data['entryDate'] = date(int(data['entryDate']['year']), int(data['entryDate']['month']), int(data['entryDate']['day'])) if data['entryDate'] else None db.setNewRegistration(data)