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

import_from_csv() may delete uploaded files #130

Open
magiraud opened this issue Apr 8, 2015 · 0 comments
Open

import_from_csv() may delete uploaded files #130

magiraud opened this issue Apr 8, 2015 · 0 comments

Comments

@magiraud
Copy link

magiraud commented Apr 8, 2015

Dear all,
The import_from_csv() code contains the following lines :

   # create new id until we get the same as old_id+offset
   while curr_id < csv_id+id_offset[self._tablename]:
         self._db(self._db[self][colnames[cid]] == curr_id).delete()

Inserted records can thus be removed several times before they reach their final id. If there is in the record any upload field, this will trigger delete_uploaded_files(), removing files when autodelete is set.

magiraud added a commit to vidjil/vidjil that referenced this issue Apr 9, 2015
init_from_csv() may remove some uploaded files.
See web2py/pydal#130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants