Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Overall Summary Fix
Browse files Browse the repository at this point in the history
- [x] Overall Summary fix for not inserting statistic data
  • Loading branch information
Suyoj Man Tamrakar committed Apr 29, 2021
1 parent ea9e9ac commit 2e00447
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions country/management/commands/generate_excel_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ def handle(self, *args, **kwargs):
columns += 1

try:
obj, created = OverallSummary.objects.get_or_create(country=country)
self.stdout.write(f"Created : {obj}, {created}")
OverallSummary.objects.filter(country=country).delete()
OverallSummary.objects.create(statistic=data, country=country)
except Exception as e:
self.stderr.write(e)
workbook.close()

0 comments on commit 2e00447

Please sign in to comment.