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

NoticeSetting.medium should be IntegerField instead of CharField #21

Open
ptone opened this issue Jul 24, 2013 · 4 comments · May be fixed by #36
Open

NoticeSetting.medium should be IntegerField instead of CharField #21

ptone opened this issue Jul 24, 2013 · 4 comments · May be fixed by #36

Comments

@ptone
Copy link

ptone commented Jul 24, 2013

When the model is validated, the to_python of the charfield returns the value '0' which is not a valid choice key.

This trips up django.db.models.fields.Field.validate and causes any modelform for this model to fail submission (including in the admin).

see also:

https://code.djangoproject.com/ticket/20800

for why this took me more than a second to debug

@paltman
Copy link
Member

paltman commented Aug 10, 2013

@ptone thanks for this, somehow i had missed it and just not logged onto Freenode and got your message (I use a bouncer). I'll look into this over the next week.

@andrenerd
Copy link

the same thing...

@xaralis
Copy link

xaralis commented Jul 2, 2014

+1 On this. It's quite simple fix, i can send a PR if interested.

@sherzberg
Copy link

I would rather change the load_backends function to not use integer ids to represent the medium.

If you rearrange the backends, this would break user setttings. I propose we use either a required name attribute on a backend, or the full dotted class name.

Thoughts?

EDIT: actually, can we just use the label of the backend?

default_backends = [                                                                                
     ("email", "notification.backends.email.EmailBackend"),                                          
] 

@sherzberg sherzberg linked a pull request Aug 27, 2014 that will close this issue
bsnux pushed a commit to bsnux/django-notification that referenced this issue Sep 1, 2014
ondrejchmelar pushed a commit to fragaria/django-notification that referenced this issue Apr 5, 2019
ondrejchmelar pushed a commit to fragaria/django-notification that referenced this issue Apr 5, 2019
ondrejchmelar pushed a commit to fragaria/django-notification that referenced this issue Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants