Kindly remove this post if this isn’t in the right sub (: (Is this the right sub for questions like this?)
I have a situation where a “guest ” (as G) and a “user” (as U) can book flights. The model U contains field fora profile with personal details and payment details. Guest, however doesn’t have this model. Instead, in the `booking` model has guest’s personal fields and payment fields in it, as well as the computed display fields which are computed as follows:
If account_type == guest, copy guest’s input in `booking` model to the display fields (also in `booking`)
If account_type == user, copy user’s profile details in `user` model the display fields (in `booking`).
Is this the right way to do it? If not then how?
submitted by /u/CocoTennisBall
[link] [comments]