Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added nullIfNotAuthed arg to CurrentUserDefault #9176

Closed
wants to merge 1 commit into from

Conversation

MicheleAwada
Copy link

simple change

to not reinvent the wheel, in case of a model that might have an optional user field, added an arg that by default changes nothing but when nullIfNotAuthed is set to true then returns null if a user is not authenticated.

this prevents an error that the anonymous user is not a user model

to prevent error when using a optional user field and the user isnt authenticated
@auvipy auvipy self-requested a review December 8, 2023 18:34
@auvipy auvipy requested a review from tomchristie January 4, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants