brutasse / django-push

PubSubHubbub support for Django
https://django-push.readthedocs.io
BSD 3-Clause "New" or "Revised" License
93 stars 27 forks source link

Fix for adding subscriptions through the django admin #14

Open dferrante opened 10 years ago

dferrante commented 10 years ago

the admin.py for subscriber tries to do a url reverse for subscriber_callback, but the primary key doesn't exist for new subscriber objects, so it errors out. these commits just have it return None if the pk doesn't exist. this shouldn't mess up any existing code, and callback_url isn't called for anything significant until after the object is created, so returning None shouldn't have any side effects. all tests pass. if you think this is all good, please merge and push to pypi at your convenience, thanks!

timgraham commented 8 years ago

Can you add a regression test?