django-oscar / django-oscar-accounts

Managed accounts for Django (with or without django-oscar)
BSD 3-Clause "New" or "Revised" License
212 stars 119 forks source link

fix: Update max length on username field #118

Closed TurnrDev closed 3 years ago

TurnrDev commented 3 years ago

As of Django 1.1, the Username field on the standard Auth User is 150 chars long.

Since the Transfer model caches the username for audit purpose, this PR fixes a bug in which anybody with a username longer than 128 chars wouldn't save.

https://github.com/django-oscar/django-oscar-accounts/blame/master/src/oscar_accounts/abstract_models.py#L375

Django 1.10: Changed to 150 Django 2.2: Lowest supported by this library Django 3.1: Latest Django at time of writing

codecov[bot] commented 3 years ago

Codecov Report

Merging #118 (e688bf3) into master (6c71f7b) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #118   +/-   ##
=======================================
  Coverage   64.98%   64.98%           
=======================================
  Files          28       28           
  Lines        1411     1411           
=======================================
  Hits          917      917           
  Misses        494      494           
Impacted Files Coverage Δ
src/oscar_accounts/abstract_models.py 86.82% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6c71f7b...e688bf3. Read the comment docs.

solarissmoke commented 3 years ago

Thanks!