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

Cache user disctrict #97

Merged
merged 2 commits into from
Oct 5, 2023
Merged

Cache user disctrict #97

merged 2 commits into from
Oct 5, 2023

Conversation

delcroip
Copy link
Member

No description provided.

@delcroip delcroip changed the base branch from main to develop September 28, 2023 09:42
"""
Retrieve the list of UserDistricts for a user, the locations are prefetched on two levels.
:param user: InteractiveUser to filter on
:return: UserDistrict *objects*
"""
qs = cache.get('user_disctrict_'+user.id)

Check warning

Code scanning / CodeQL

Variable defined multiple times

This assignment to 'qs' is unnecessary as it is [redefined](1) before this value is used.
@sonarcloud
Copy link

sonarcloud bot commented Sep 28, 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

62.5% 62.5% Coverage
0.0% 0.0% Duplication

@delcroip delcroip merged commit 991c592 into develop Oct 5, 2023
5 of 8 checks passed
@delcroip delcroip deleted the cache-user-disctrict branch October 5, 2023 07:47
dragos-dobre added a commit that referenced this pull request Oct 18, 2023
* OP-1544: update tranlations in location module (#90)

Co-authored-by: Jan <j.dolkowski@soldevelo.com>

* ONI-105-2: Added check for contract dates as mandatory on setting. (#89)

* CI update

* CI Update 2

* fix CI and mutation (#94)

* OP-1579: Changed default settings and contract fields in model of HF contracts. (#95)

* OP-1579: Changed default settings of HF contracts.

* OP-1579: Changed contract dates to DateField types.

* improve test, contractdate not mandatory by defaut (#96)

* Better helpers (#98)

* better helpers

* Cache user disctrict (#97)

* cache-user-disctrict

* hotfix

* ONI-175: Fixed HF status field. (#100)

* Parent search (#101)

* fast search for parent

* new way to compute the list

* Parent search (#102)

---------

Co-authored-by: Jan <jdolkowski@soldevelo.com>
Co-authored-by: Jan <j.dolkowski@soldevelo.com>
Co-authored-by: wzglinieckisoldevelo <98958634+wzglinieckisoldevelo@users.noreply.github.com>
Co-authored-by: Damian Borowiecki <dborowiecki@soldevelo.com>
Co-authored-by: Patrick Delcroix <patrick.delcroix@swisstph.ch>
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.

None yet

1 participant