Skip to content

ModelFormSetView "sometimes" deletes row? #211

@faulander

Description

@faulander

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions