Skip to content
Snippets Groups Projects
Commit 3938b0b8 authored by Dariusz Kędzierski's avatar Dariusz Kędzierski
Browse files

Fixes

parent 7d46be91
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!336Mock data providers
...@@ -51,7 +51,7 @@ class MockVopsProvider(MockDataProvider): ...@@ -51,7 +51,7 @@ class MockVopsProvider(MockDataProvider):
@classmethod @classmethod
def get_block_data(cls, block_num): def get_block_data(cls, block_num):
ret = {} ret = {}
if cls.block_data: if 'ops' in cls.block_data:
for ops in cls.block_data['ops']: for ops in cls.block_data['ops']:
if ops['block'] == block_num: if ops['block'] == block_num:
ret['timestamp'] = ops['timestamp'] ret['timestamp'] = ops['timestamp']
...@@ -59,6 +59,7 @@ class MockVopsProvider(MockDataProvider): ...@@ -59,6 +59,7 @@ class MockVopsProvider(MockDataProvider):
ret['ops'].append(ops) ret['ops'].append(ops)
else: else:
ret['ops'] = [ops] ret['ops'] = [ops]
if 'ops_by_block' in cls.block_data:
for ops in cls.block_data['ops_by_block']: for ops in cls.block_data['ops_by_block']:
if ops['block'] == block_num: if ops['block'] == block_num:
ret['timestamp'] = ops['timestamp'] ret['timestamp'] = ops['timestamp']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment