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

ModelFormSetView "sometimes" deletes row? #211

Open
faulander opened this issue Jan 27, 2020 · 0 comments
Open

ModelFormSetView "sometimes" deletes row? #211

faulander opened this issue Jan 27, 2020 · 0 comments

Comments

@faulander
Copy link

faulander commented Jan 27, 2020

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?

@faulander faulander changed the title ModelFormSetView "sometimes" deleted data? ModelFormSetView "sometimes" deletes row? Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant