Skip to content

Commit cc1808d

Browse files
committed
Add new flag to store mapping files in memory in edge
1 parent 5723b4f commit cc1808d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ravenpackapi/models/reference.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def __init__(self, http_response=None, file_path=None, product='rpa'):
111111
self._entities = {}
112112
self.product = product
113113
self.encoding = 'utf-8' if self.product == "edge" else 'latin-1'
114+
self.store_in_memory = self.product == "rpa"
114115
assert http_response or file_path, "Please provide one source"
115116

116117
def _iter_rows(self):
@@ -135,7 +136,7 @@ def _parse_lines(self):
135136
for line in iterator:
136137
parsed_line = parse_csv_line(line)
137138
rp_entity_id, entity_type, data_type, data_value, range_start, range_end = parsed_line
138-
if self.product == 'rpa':
139+
if self.store_in_memory:
139140
# we keep track of all the parsed entities just for rpa
140141
if rp_entity_id not in self._entities:
141142
self._entities[rp_entity_id] = entity = RpEntityReference(rp_entity_id, {},

0 commit comments

Comments
 (0)