You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usergroup is being queried manually to support the /new endpoint. The @load_models decorator needs a way to be told that querying UserGroup is optional based on the value of the group parameter. At the moment the None value for group will be passed on to the query.
One way to handle this is for coaster.views to define a singleton (perhaps named OPTIONALQ) that can be passed as the default value in the route. If this singleton is received by load_models, it can skip the query. The singleton can also evaluate to boolean false to support typical use cases.
The text was updated successfully, but these errors were encountered:
Consider this use case from Funnel:
usergroup
is being queried manually to support the/new
endpoint. The@load_models
decorator needs a way to be told that queryingUserGroup
is optional based on the value of thegroup
parameter. At the moment theNone
value forgroup
will be passed on to the query.One way to handle this is for
coaster.views
to define a singleton (perhaps namedOPTIONALQ
) that can be passed as the default value in the route. If this singleton is received byload_models
, it can skip the query. The singleton can also evaluate to boolean false to support typical use cases.The text was updated successfully, but these errors were encountered: