Skip to content

Conversation

marksweb
Copy link
Member

@marksweb marksweb commented Sep 25, 2022

Description

I use a User model which has no username, therefore get_queryset() fails because there's no username attribute on the User.

This allows a project to specify what field on User can be used to identify a user.

This doesn't include proper testing, but to test this properly it needs a custom model, a corresponding model manager that can create users without a username. I'm hesitant to add these to the project, so if anybody has any suggestions on how to test against this I'd love to hear them.

Related resources

Checklist

  • I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

@codecov
Copy link

codecov bot commented Sep 25, 2022

Codecov Report

Merging #293 (9734e58) into master (4e5b1c4) will increase coverage by 1.74%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
+ Coverage   85.17%   86.91%   +1.74%     
==========================================
  Files          24       30       +6     
  Lines         931     1743     +812     
  Branches      141      269     +128     
==========================================
+ Hits          793     1515     +722     
- Misses        108      173      +65     
- Partials       30       55      +25     
Impacted Files Coverage Δ
djangocms_versioning/admin.py 88.76% <100.00%> (ø)
djangocms_versioning/conf.py 100.00% <100.00%> (ø)
djangocms_versioning/forms.py 100.00% <0.00%> (ø)
djangocms_versioning/cms_config.py 81.21% <0.00%> (ø)
djangocms_versioning/__init__.py 100.00% <0.00%> (ø)
djangocms_versioning/models.py 94.85% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@fsbraun fsbraun merged commit 3e6fb53 into django-cms:master Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants