Skip to content

Commit

Permalink
Merge pull request #117 from tesla-ce/add_tests
Browse files Browse the repository at this point in the history
Add tests
  • Loading branch information
xbaro authored Nov 29, 2021
2 parents 5f3eaaf + ad08d88 commit 88a1751
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion providers/registry.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
{"acronym": "fr_tfr", "url": "https://raw.githubusercontent.com/tesla-ce/provider-fr-tfr/main/fr_tfr.info.json"},
{"acronym": "plag_urkund", "url": "https://raw.githubusercontent.com/tesla-ce/provider-pt-urkund/main/options.json"},
{"acronym": "ks_tks", "url": "https://raw.githubusercontent.com/tesla-ce/provider-ks-tks/main/options.json"},
{"acronym": "ks_tks", "url": "https://raw.githubusercontent.com/tesla-ce/provider-ks-tks/main/options.json"}
]
2 changes: 1 addition & 1 deletion src/tesla_ce/lib/data/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.20
0.0.21
13 changes: 13 additions & 0 deletions src/tesla_ce/management/commands/resend_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,19 @@ def custom_handle(self):
error_count = 0
for request in requests.all():
try:
for instrument in request.instruments.all():
providers = models.Provider.objects.filter(instrument_id=instrument.id, enabled=True).all()
for provider in providers:
models.RequestProviderResult.objects.filter(
request=request,
provider=provider
).delete()

models.RequestResult.objects.filter(
request_id=request.id,
instrument_id=instrument.id
).delete()

tasks.requests.verification.verify_request(request.id)
except Exception:
error_count += 1
Expand Down

0 comments on commit 88a1751

Please sign in to comment.