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

Optimize copy opening hours #135

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pirkkahuhtala
Copy link

No description provided.

@pirkkahuhtala pirkkahuhtala force-pushed the feature/optimize-copy-opening-hours branch 2 times, most recently from 50bb60b to 5c73a60 Compare December 27, 2022 14:30
@pirkkahuhtala pirkkahuhtala changed the title Add bulk operations Optimize copy date periods Dec 27, 2022
@pirkkahuhtala pirkkahuhtala changed the title Optimize copy date periods Optimize copy opening hours Dec 27, 2022
@pirkkahuhtala pirkkahuhtala force-pushed the feature/optimize-copy-opening-hours branch 5 times, most recently from 6e5a118 to 3148e25 Compare December 28, 2022 10:25
@pirkkahuhtala pirkkahuhtala marked this pull request as ready for review December 28, 2022 12:28
@pirkkahuhtala pirkkahuhtala force-pushed the feature/optimize-copy-opening-hours branch 5 times, most recently from 2c163c0 to fefc7fe Compare December 29, 2022 10:52
@pirkkahuhtala pirkkahuhtala force-pushed the feature/optimize-copy-opening-hours branch 8 times, most recently from 5d4cd80 to 7ef21e8 Compare January 10, 2023 09:01
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))
Copy link
Author

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.

@pirkkahuhtala pirkkahuhtala force-pushed the feature/optimize-copy-opening-hours branch from 7ef21e8 to e0c84de Compare January 17, 2023 05:41
@pirkkahuhtala pirkkahuhtala force-pushed the feature/optimize-copy-opening-hours branch from e0c84de to 0511f3b Compare February 7, 2023 13:30
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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):
Copy link
Author

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.

@tuomas777
Copy link
Contributor

Related ticket

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