It'd be lovely to be able to compare table instances at a top level without the need to dive down into attributes. Further, users could always override the default id comparison on tables if they do special things.
An example use case of mine:
@post(
path="/{project_id:str}/settings/toggle_public_view",
include_in_schema=False,
)
async def toggle_public_view(self, request: Request, project_id: str) -> Redirect:
project, redirect = await self.get_project(request, project_id)
if redirect:
return redirect
if project.owner != request.user:
alert(
request,
"You must be the project owner to change project visibility.",
level="error",
)
return project.redirect_to()
However with the current behavior the following occurs:
It'd be lovely to be able to compare table instances at a top level without the need to dive down into attributes. Further, users could always override the default
id
comparison on tables if they do special things.An example use case of mine:
However with the current behavior the following occurs: