Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bulk_insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ def pack_header(self, header):
def pack_props(self, line):
props = []
for num, field in enumerate(line[self.prop_offset:]):
field_type_idx = self.prop_offset+num
try :
FIELD_TYPES[self.entity_str][num]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, let's change this line to index into field_type_idx rather than num.

except :
props.append(prop_to_binary(field, None))
else :
props.append(prop_to_binary(field, FIELD_TYPES[self.entity_str][num]))

props.append(prop_to_binary(field, FIELD_TYPES[self.entity_str][field_type_idx]))
return b''.join(p for p in props)

def to_binary(self):
Expand Down