Fixes IndexError on save with removed member forwarding email (#11)
* Fixed IndexError if a non existent field gets queried for a value. Using dict.get to either get a value or provide a reasonable default * Removed list construction around new_key value * Clean up source code with 80x25 terminal and vim (complies with PEP-8) * Added some docstrings
This commit is contained in:
parent
4f093c0899
commit
09af25761c
7 changed files with 409 additions and 194 deletions
|
|
@ -4,6 +4,7 @@ def create_profile(sender, instance, signal, created, **kwargs):
|
|||
if created:
|
||||
UserProfile(user=instance).save()
|
||||
|
||||
|
||||
def delete_profile(sender, instance, signal, **kwargs):
|
||||
from account.models import UserProfile
|
||||
UserProfile(user=instance).delete()
|
||||
UserProfile(user=instance).delete()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue