Skip to content

Commit

Permalink
Oplog skipped even if confg.OPLOG=True
Browse files Browse the repository at this point in the history
Check for resource name validity is being reversed.
Closes #1074.
  • Loading branch information
lexhung authored and nicolaiarocci committed Mar 30, 2018
1 parent 9dabbf5 commit 9a2350b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eve/methods/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ def oplog_push(resource, document, op, id=None):
'r' = resource endpoint,
'o' = operation performed,
'i' = unique id of the document involved,
'pi' = client IP,
'ip' = client IP,
'c' = changes
config.LAST_UPDATED, config.LAST_CREATED and AUTH_FIELD are not being
Expand All @@ -1258,9 +1258,10 @@ def oplog_push(resource, document, op, id=None):
.. versionadded:: 0.5
"""

if not config.OPLOG \
or op not in config.OPLOG_METHODS\
or resource in config.URLS[resource]:
or resource not in config.URLS:
return

resource_def = config.DOMAIN[resource]
Expand Down

0 comments on commit 9a2350b

Please sign in to comment.