What steps will reproduce the problem?
1. create a subclass of cron.Cron with run_every set to e.g. 1
2. let django-cron execute at least once, so the cron_cron table gets populated
3. change the run_every property to something else, e.g. to 2
4. let django-cron execute again. See exception "cron.models.DoesNotExist:
CronType matching query does not exist."
Reason for this is that in models.py line 13, the value of run_every is
used in the get_or_create() call. The exception occurs because the database
already contains an object with the same name, but a different value. Since
the name column is marked as unique, Django can't create that object.
The attached patch fixes that issue by not using run_every in the
get_or_create call, but setting it explicitely later.
Original issue reported on code.google.com by chris.vigelius on 16 Jun 2008 at 9:59
Original issue reported on code.google.com by
chris.vigelius
on 16 Jun 2008 at 9:59Attachments: