Lastaapps / menza

This Android app shows dish menus for CTU cafeterias from agata.suz.cvut.cz web in much more pleasant and usable way for phones. It shows today and week menu, opening hours, contacts, announcements and address for all the canteens. It supports dark mode and Material You including Android 12 dynamic theming.
GNU General Public License v3.0
47 stars 3 forks source link

Allergen id is out of bound #4

Closed mstieranka closed 2 years ago

mstieranka commented 2 years ago

Today's menu for Menza Strahov doesn't load.

Extra information below:

Android version: 32 App version name: 1.1.0 App version code: 1010000 Phone model: Mi 9T Pro Phone manufacturer: Xiaomi Date and Time: 2022-06-01T12:01:44.62+02:00[Europe/Prague] Screen size: 1080 x 2300 px

java.lang.IllegalArgumentException: Allergen id is out of bound: 79 at s6.b.a(SourceFile:1) at t7.c1.V(SourceFile:12) at androidx.activity.result.d.q(SourceFile:1) at a3.m.m(SourceFile:2) at t7.e1.V(SourceFile:13) at a3.m.h(SourceFile:4) at a3.m.l(SourceFile:2) at t7.i1$a.V(SourceFile:8) at h0.n.h(SourceFile:64) at t7.i1.e(SourceFile:1) at v7.h0$b.k(SourceFile:31) at aa.a.x(SourceFile:4) at ra.p0.run(SourceFile:18) at wa.f.run(SourceFile:2) at xa.l.run(SourceFile:1) at xa.a.R(SourceFile:1) at xa.a$a.run(SourceFile:10)

Edit: Looking at it further, one of the foods has the following as allergens: "6,79,13". This is probably a mistake on SUZ's side, since it should say "6,7,9,13". However, I think it would still be best if you ignored all unknown allergen IDs, just like on the Agata website (the extended allergen list only includes 6 and 13 for this food).

Lastaapps commented 2 years ago

Yeah, agree, I am planning a migration from HTML scraping to their API, I'll implement not as strict rules while doing it. Thanks for the report.