Skip to content

Commit

Permalink
stop import if no measure found
Browse files Browse the repository at this point in the history
  • Loading branch information
m4dm4rtig4n committed Dec 2, 2022
1 parent 8b028de commit 53be9c7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/query_daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def get(self):
]
app.LOG.error(error)

if "status_code" in response and response["status_code"] == 409:
if "status_code" in response and (response["status_code"] == 409 or response["status_code"] == 400):
finish = False
error = ["Arrêt de la récupération des données suite à une erreur.",
f"Prochain lancement à {datetime.datetime.now() + datetime.timedelta(seconds=app.CONFIG.get('cycle'))}"]
Expand Down
2 changes: 1 addition & 1 deletion app/models/query_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def get(self):
]
app.LOG.error(error)

if "status_code" in response and response["status_code"] == 409:
if "status_code" in response and (response["status_code"] == 409 or response["status_code"] == 400):
finish = False
error = ["Arrêt de la récupération des données suite à une erreur.",
f"Prochain lancement à {datetime.datetime.now() + datetime.timedelta(seconds=app.CONFIG.get('cycle'))}"]
Expand Down
Binary file modified app/templates/models/__pycache__/configuration.cpython-39.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions app/templates/models/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def html(self):
configuration += f'''
<tr>
<td class="key">{title}</td>
<td class="value"><input type="checkbox" id="configuration_{key}" name="{key}" {checked}></td>'''
<td class="value"><input type="checkbox" style="height: 20px;cursor: pointer;" id="configuration_{key}" name="{key}" {checked}></td>'''
if "help" in data:
configuration += f'''
<td><i class="material-icons help" alt="{data["help"]}">help_outline</i></td>'''
Expand Down Expand Up @@ -336,7 +336,7 @@ def html(self):
configuration += f'''
<tr>
<td class="key">{title}</td>
<td class="value"><input type="checkbox" id="configuration_{key}" name="{key}" {checked}></td>'''
<td class="value"><input type="checkbox" style="height: 20px;cursor: pointer;" id="configuration_{key}" name="{key}" {checked}></td>'''
if "help" in data:
configuration += f'''
<td><i class="material-icons help" alt="{data["help"]}">help_outline</i></td>'''
Expand Down

0 comments on commit 53be9c7

Please sign in to comment.