Vatsim-Scandinavia / controlcenter

Training Management System created by VATSIM Scandinavia
https://docs.vatsca.org/controlcenter/
GNU General Public License v3.0
16 stars 14 forks source link

Link position mae to endorsement instead of boolean #885

Open bjerrecs opened 3 months ago

bjerrecs commented 3 months ago

New bookings made by the following users ('1562956','1449414') resulted in the training tag been applied to the booking.

They get the error "training tag was forced due to booking a restricted position" They are both in pre-training for S3 in Denmark. They both have ATC Active & EKCH TWR on the endorsement page

I'm unable to replicate, as i have a SUP rating.

blt950 commented 3 months ago

Which positions did they attempt to book?

bjerrecs commented 3 months ago

EKCH_A_TWR

blt950 commented 3 months ago

I've confirmed this bug, it's a known issue that will exist until we link each position to a respective endorsement. Today we only say mae true/false, and it makes it impossible to check if the student has this endorsement in question.

The fix is changing the mae column in positions to link into an rating_id instead. Then use this to check if user has it in BookingController, if not, force the training tag.