Commit 28a217d1 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'cherry-pick-d0fca0ec-2' into 'release-20.2'

release-20.2:Backport!4269

See merge request noc/noc!4271
parents c3259a5b c402fb3e
......@@ -189,7 +189,7 @@ class DataStream(object):
if not is_changed(doc, hash):
logger.info("[%s] Object hasn't been changed", l_name)
return False # Not changed
if not format and cls.on_change(data):
if not fmt and cls.on_change(data):
hash = cls.get_hash(data)
if not is_changed(doc, hash):
logger.info("[%s] Object hasn't been changed", l_name)
......@@ -455,6 +455,7 @@ class DataStream(object):
raise ValueError("Invalid instance")
return {"_id": {"$mod": [n_instances, instance]}}
@classmethod
def get_format_role(cls, fmt: str) -> Optional[str]:
"""
Returns format role, if any
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment