Skip to content

Commit

Permalink
Merge pull request #472 from umeboshi2/add-unimplemented-list-method-…
Browse files Browse the repository at this point in the history
…for-new-filedepot

added list method for newer versions of filedepot
  • Loading branch information
disko committed Oct 28, 2015
2 parents 30b4439 + 9f98e94 commit 71602f9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kotti/filedepot.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ def replace(self, file_or_id, content, filename=None, content_type=None):
Given a :class:`StoredFile` or its ID it will replace the current
content with the provided ``content`` value. If ``filename`` and
``content_type`` are provided or can be deducted by the ``content``
itself they will also replace the previous values, otherwise the current
values are kept.
itself they will also replace the previous values, otherwise
the current values are kept.
:param file_or_id: can be either ``DBStoredFile`` or a ``file_id``
Expand Down Expand Up @@ -283,6 +283,9 @@ def exists(self, file_or_id):
return bool(
DBSession.query(DBStoredFile).filter_by(file_id=file_id).count())

def list(self, *args):
raise NotImplementedError("list() method is unimplemented.")

def _get_file_id(self, file_or_id):
if hasattr(file_or_id, 'file_id'):
return file_or_id.file_id
Expand Down

0 comments on commit 71602f9

Please sign in to comment.