The active flag in the query was excluding some services.

The active flag wasn't always used, plus a service should always be active on the first version of the service.
This commit is contained in:
Rebecca Law
2019-04-08 11:24:45 +01:00
parent 0b4030183c
commit aca2817184

View File

@@ -771,8 +771,7 @@ def get_letter_details_from_zips_sent_file(file_paths):
@notify_command(name='associate-services-to-organisations') @notify_command(name='associate-services-to-organisations')
def associate_services_to_organisations(): def associate_services_to_organisations():
services = Service.get_history_model().query.filter_by( services = Service.get_history_model().query.filter_by(
version=1, version=1
active=True
).all() ).all()
for s in services: for s in services: