AndrewIngram/django-extra-views

ModelFormSetView "sometimes" deletes row?

faulander opened this issue · 0 comments

i have a flat table with only one row, which represent the settings of my app.
this is the declaration:

class SettingsFormSetView(ModelFormSetView):
    model = Setting
    fields = ['profile', 'addmonitored', 'seasonfolders']
    template_name = 'settings.html'
    factory_kwargs = {'extra': 0}

i have another field in the table called "page" which is updated in one other place:

    page -= 2
    S = Setting.objects.get(pk=1)
    S.page = page
    S.save()

So nothing wrong there, it works. I can open the form, change values, the page works as intended. All other references to the Settings table are "get" only.

But sometimes suddenly the table row is empty and i cannot figure out why?