Skip to content

Commit

Permalink
Merge pull request #836 from jan-stanek/fixes2
Browse files Browse the repository at this point in the history
Empty email, phone + null fixes
  • Loading branch information
msusicky authored Apr 23, 2024
2 parents 681e88d + 9bab54d commit 4ced59a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
| deployment | [![deploy-acceptance](https://github.com/msusicky/ockovani-covid/actions/workflows/deploy-acceptance.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/deploy-acceptance.yml) [![deploy-production](https://github.com/msusicky/ockovani-covid/actions/workflows/deploy-production.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/deploy-production.yml) [![check-disk-space](https://github.com/msusicky/ockovani-covid/actions/workflows/check-disk-space.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/check-disk-space.yml) |
| acceptance | [![test](https://github.com/msusicky/ockovani-covid/actions/workflows/test.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/test.yml) |
| production | [![update-data-daily](https://github.com/msusicky/ockovani-covid/actions/workflows/update-data-daily.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/update-data-daily.yml) [![update-data-hourly](https://github.com/msusicky/ockovani-covid/actions/workflows/update-data-hourly.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/update-data-hourly.yml) [![update-data-monthly](https://github.com/msusicky/ockovani-covid/actions/workflows/update-data-monthly.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/update-data-monthly.yml) [![clean-db](https://github.com/msusicky/ockovani-covid/actions/workflows/clean-db.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/clean-db.yml) |
| publication | [![update-web](https://github.com/msusicky/ockovani-covid/actions/workflows/update-web.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/update-web.yml) [![post-tweet](https://github.com/msusicky/ockovani-covid/actions/workflows/post-tweet.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/post-tweet.yml) |
| publication | [![update-web](https://github.com/msusicky/ockovani-covid/actions/workflows/update-web.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/update-web.yml) [![update-web-offers](https://github.com/msusicky/ockovani-covid/actions/workflows/update-web-offers.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/update-web-offers.yml) [![post-tweet](https://github.com/msusicky/ockovani-covid/actions/workflows/post-tweet.yml/badge.svg)](https://github.com/msusicky/ockovani-covid/actions/workflows/post-tweet.yml) |


# COVID-19 data o očkování (https://ockovani.opendatalab.cz)
Expand Down
2 changes: 2 additions & 0 deletions app/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def praktici_admin_edit():
vaccine.nemoc = nemoc
vaccine.typ_vakciny = typ_vakciny

vaccine.pocet_davek = 0

aktivni = [int(v) - 1 for v in request.form.getlist('aktivni[]')]
vaccine.aktivni = i in aktivni

Expand Down
1 change: 1 addition & 0 deletions app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@ class PrakticiLogin(db.Model):
def __init__(self, id, passwd):
self.zdravotnicke_zarizeni_kod = id
self.heslo = passwd
self.neregistrovani = False

def __repr__(self):
return f"<PrakticiLogin(zdravotnicke_zarizeni_kod='{self.zdravotnicke_zarizeni_kod}')>"
Expand Down
4 changes: 2 additions & 2 deletions app/templates/praktici_admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ <h5>Kontakt</h5>
<table class="table table-borderless table-sm">
<tr>
<th>Telefon</th>
<td><input type="text" name="telefon" value="{{ user.telefon }}"/></td>
<td><input type="text" name="telefon" value="{{ user.telefon if user.telefon else '' }}"/></td>
</tr>
<tr>
<th>E-mail</th>
<td><input type="text" name="email" value="{{ user.email }}"/></td>
<td><input type="text" name="email" value="{{ user.email if user.email else '' }}"/></td>
</tr>
</table>
</div>
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_disk_space.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
LIMIT=70
LIMIT=80
used_str=$(df -Ph . | tail -1 | awk '{print $5}')
used_num=$(echo "$used_str" | tr -d "%")
if [ $used_num -gt $LIMIT ]; then
Expand Down

0 comments on commit 4ced59a

Please sign in to comment.