Skip to content

Commit

Permalink
various bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmargutt committed Dec 6, 2024
1 parent 5c2e446 commit e52ac93
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 172 deletions.
7 changes: 3 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def create_distrib():
return redirect(url_for("name_distrib"))
if (
datetime.strptime(request.form["distrib_date"], "%Y-%m-%d").date()
> datetime.now().date()
< datetime.now().date()
):
flash("Date of the distribution cannot be in the past.")
return redirect(url_for("name_distrib"))
Expand Down Expand Up @@ -240,9 +240,8 @@ def get_list_distrib():
distrib_features["Date"] = distrib_.date
distrib_features["Items distributed"] = distrib_.items
distrib_features["Donor"] = distrib_.donor
distrib_list.loc[len(distrib_list), distrib_features.keys()] = (
distrib_features.values()
)
df_dictionary = pd.DataFrame([distrib_features])
distrib_list = pd.concat([distrib_list, df_dictionary], ignore_index=True)
return distrib_list


Expand Down
Binary file modified data/data_template.xlsx
Binary file not shown.
Loading

0 comments on commit e52ac93

Please sign in to comment.