Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions cache_registry/sync/fgases.py
Original file line number Diff line number Diff line change
@@ -29,8 +29,8 @@ def eea_double_check_fgases(data):
remove_undertaking(data, domain=FGAS)
ok = False

if not all(('status' in data, data['status'] in ['VALID', 'DISABLED'])):
message = 'Organisation status differs from VALID or DISABLED.'
if not all(('status' in data, data['status'] in ['VALID'])):
message = 'Organisation status differs from VALID.'
current_app.logger.error(message + identifier)
ok = False

@@ -45,12 +45,6 @@ def eea_double_check_fgases(data):
current_app.logger.error(message + identifier)
ok = False

if all([data['status'] == 'DISABLED',
len(data.get('contactPersons', {})) > 0]):
message = "Contact Persons available for DISABLED company"
current_app.logger.error(message + identifier)
ok = False

if not data['domain'] == FGAS:
message = "Organisation domain is not FGAS"
current_app.logger.error(message + identifier)
10 changes: 2 additions & 8 deletions cache_registry/sync/ods.py
Original file line number Diff line number Diff line change
@@ -40,14 +40,8 @@ def eea_double_check_ods(data):
current_app.logger.error(message + identifier)
ok = False

if not data['status'] in ['VALID', 'DISABLED']:
message = 'Organisation status differs from VALID or DISABLED.'
current_app.logger.error(message + identifier)
ok = False

if all([data['status'] == 'DISABLED',
len(data.get('contactPersons', {})) > 0]):
message = "Contact Persons available for DISABLED company."
if data['status'] not in ['VALID']:
message = 'Organisation status differs from VALID.'
current_app.logger.error(message + identifier)
ok = False

0 comments on commit a3db953

Please sign in to comment.