Filter out deleted envs in dispatch_create_environment

This commit is contained in:
richard-dds
2019-09-19 14:24:39 -04:00
parent d6742e5169
commit 6c7667b7fc
2 changed files with 13 additions and 3 deletions

View File

@@ -104,6 +104,7 @@ class Environments(object):
.join(CLIN)
.filter(CLIN.start_date <= now)
.filter(CLIN.end_date > now)
.filter(Environment.deleted == False)
.filter(
or_(
Environment.claimed_until == None,