Skip to content

Signal receiver that creates UserProfile when User created (fixes #581)#582

Open
JarUrb wants to merge 5 commits intostxnext-csr:masterfrom
JarUrb:user-without-userprofile
Open

Signal receiver that creates UserProfile when User created (fixes #581)#582
JarUrb wants to merge 5 commits intostxnext-csr:masterfrom
JarUrb:user-without-userprofile

Conversation

@JarUrb
Copy link

@JarUrb JarUrb commented Nov 9, 2016

Bug id: #581

Reference person: @JarUrb

Description:

When user is created using manage.py createsuperuser, user's profile isn't created. It can lead to internal server errors (HTTP 500).

In commit 2bdb371 I added test to show that case. That test would fail without changes in commit bb924b5. I also had to fix other tests in commit 1e5d85c.

I know that some people don't like signals, but without this change we would have to deal with inconsistent data (i.e. user without corresponding UserProfile) or solve the problem another way (e.g. by subclassing Django's User model and overriding save() method) or forbid using manage.py createsuperuser entirely.

@magul
Copy link
Member

magul commented Nov 10, 2016

@JarUrb Cześć, po pierwsze miło Ciebie widzieć i super, że ktoś się angażuje!

Druga sprawa jest taka, że ten akurat PR nie przechodzi testów na Travisie (https://travis-ci.org/stxnext-csr/volontulo/builds/174596430) i w tym sensie nikt tego nie zmerdżuje.

No i trzecia kwestia, turaj raczej to już w ogóle nie pracuje, całą zaangażowaną ekipą przenosimy się do @CodeForPoznan, więc jeżeli będziesz chciał nad tym projektem popracować w kilka osób, to pewnie dobrze byłoby, gdybyś tam wystawiał PR i zgłaszał błędy.

Mamy tam jeszcze kilka rzeczy do dociągnięcia (chociażby skonfigurować poprawnie gittera i travisa), ale to typowe choroby wieku dziecięcego i pewnie niedługo ruszymy dosyć sprawnie.

Daj znać co o tym myślisz.

pzdr

@codecov-io
Copy link

codecov-io commented Nov 15, 2016

Current coverage is 91.37% (diff: 98.41%)

Merging #582 into master will increase coverage by 0.10%

@@             master       #582   diff @@
==========================================
  Files            53         56     +3   
  Lines          2073       2099    +26   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1892       1918    +26   
  Misses          181        181          
  Partials          0          0          

Powered by Codecov. Last update 5a7a192...eed92e5

@JarUrb
Copy link
Author

JarUrb commented Nov 15, 2016

Cześć @magul.

  1. Zobaczymy, na jak długo starczy mi zapału.
  2. Już przechodzi (dzięki poprawkom w 7b2b098).
  3. Dziwi mnie to trochę, bo widzę, że jesteś członkiem organizacji stxnext-csr, więc chyba prace mogłyby być prowadzone w dotychczasowym repo. Ale OK, skoro taką podjęliście decyzję, to będę zgłaszał pull requesty do CodeForPoznań. Oto prośba o włączenie tej samej gałęzi: Signal receiver that creates UserProfile when User created (fixes #494) CodeForPoznan/volontulo#497.

Chciałem się zająć którymś z wcześniej zgłoszonych błędów, ale nie miałem zbyt wiele czasu, żeby się wgryźć w kod i połapać, o co w tym wszystkim chodzi. Będę jednak próbował porobić coś w projekcie.

Pozdrawiam.

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.

3 participants