-
Notifications
You must be signed in to change notification settings - Fork 13
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
Optimize copy opening hours #135
base: main
Are you sure you want to change the base?
Conversation
50bb60b
to
5c73a60
Compare
6e5a118
to
3148e25
Compare
2c163c0
to
fefc7fe
Compare
5d4cd80
to
7ef21e8
Compare
if target_resources.count() != len(target_resource_ids): | ||
for target_resource_id in target_resource_ids: | ||
try: | ||
Resource.objects.get(**get_resource_pk_filter(target_resource_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something I would have liked to do so that we would not need to do another select for getting the non-found resources.
7ef21e8
to
e0c84de
Compare
e0c84de
to
0511f3b
Compare
Kudos, SonarCloud Quality Gate passed! |
from django.db import models | ||
from django.utils.translation import gettext_lazy as _ | ||
from helusers.models import AbstractUser | ||
|
||
|
||
class CustomUserManager(UserManager): | ||
def get(self, *args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intent here was to try to optimise the permission check a bit so that it would not need to fetch the user orgs every time.
No description provided.