Skip to content

Commit

Permalink
Mobile Module: Fix data import import issue
Browse files Browse the repository at this point in the history
Fixed an issue that failed to create STR when importing data.
  • Loading branch information
pgathogo committed Sep 14, 2024
1 parent 368e6a8 commit f95279f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions stdm/geoodk/importer/entity_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,7 @@ def save_to_db(self):
full_party_ref_column = current_profile().social_tenure.parties[0].name
party_ref_column = full_party_ref_column.replace(prefix, '') + '_id'


party_id = self.parent_data.get(full_party_ref_column)
party_id = self.parent_data.get(full_party_ref_column)[0]
if party_id:
setattr(self.model, party_ref_column, party_id)

Expand Down Expand Up @@ -397,8 +396,6 @@ def save_foreign_key_table(self):

def column_info(self):
"""
:return:
"""
self.entity_mapping = {}
cols = list(self.entity.columns.values())
Expand Down

0 comments on commit f95279f

Please sign in to comment.