Commit a9c94891 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Minor fixes.

parent 671ef31a
Pipeline #65596 passed with stages
in 18 minutes and 34 seconds
......@@ -38,7 +38,7 @@ def import_command(path_to_users_file):
for user_dict in users:
try:
password = user_dict.pop('password')
user_dict['created'] = datetime.datetime.fromtimestamp(user_dict['created']/1000)
user_dict['created'] = datetime.datetime.fromtimestamp(user_dict['created'] / 1000)
user = datamodel.User(**user_dict)
infrastructure.keycloak.add_user(user, bcrypt_password=password, invite=False)
print('Imported %s' % user.name)
......
......@@ -76,9 +76,6 @@ def setup_logging():
def setup_mongo():
""" Creates connection to mongodb. """
global mongo_client
if mongo_client is not None:
return mongo_client
try:
mongo_client = connect(db=config.mongo.db_name, host=config.mongo.host, port=config.mongo.port)
except MongoEngineConnectionError:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment