Allow application creation without environments

This commit is contained in:
graham-dds 2019-09-24 10:08:22 -04:00
parent 8c8f0be761
commit 2dd24aa286

View File

@ -49,7 +49,10 @@ class Applications(BaseDomainClass):
application.name = new_data["name"]
if "description" in new_data:
application.description = new_data["description"]
if "environment_names" in new_data:
Environments.create_many(
g.current_user, application, new_data["environment_names"]
)
db.session.add(application)
db.session.commit()