Skip to content

Commit

Permalink
Migration to v13: always set computed fields
Browse files Browse the repository at this point in the history
  • Loading branch information
DocMarty84 committed Oct 27, 2019
1 parent 005ea7c commit 2a1cd39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion models/oovideo_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class VideoFolder(models.Model):
@api.depends("path")
def _compute_root_preview(self):
ALLOWED_FILE_EXTENSIONS = self.env["oovideo.folder.scan"].ALLOWED_FILE_EXTENSIONS
for folder in self.filtered(lambda f: f.root and f.path):
for folder in self:
if not folder.root or not folder.path:
folder.root_preview = False
continue
i = 0
fn_paths = ""
for rootdir, dirnames, filenames in os.walk(folder.path):
Expand Down

0 comments on commit 2a1cd39

Please sign in to comment.