mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:07:08 +00:00
Add option to import file data for preplot files
This commit is contained in:
@@ -186,7 +186,7 @@ class Datastore:
|
||||
# We do not commit if we've been passed a cursor, instead
|
||||
# we assume that we are in the middle of a transaction
|
||||
|
||||
def save_preplots(self, lines, filepath, preplot_class, epsg = 0):
|
||||
def save_preplots(self, lines, filepath, preplot_class, epsg = 0, filedata = None):
|
||||
"""
|
||||
Save preplot data.
|
||||
|
||||
@@ -246,6 +246,9 @@ class Datastore:
|
||||
|
||||
cursor.executemany(qry, points)
|
||||
|
||||
if filedata is not None:
|
||||
self.save_file_data(filepath, json.dumps(filedata), cursor)
|
||||
|
||||
self.maybe_commit()
|
||||
|
||||
def save_raw_p190(self, records, fileinfo, filepath, epsg = 0, filedata = None, ntbp = False):
|
||||
|
||||
Reference in New Issue
Block a user