Skip to content

Commit

Permalink
fix #563 Extract local changes processing alg
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterPetrik committed Jan 30, 2024
1 parent 29bb14a commit 14af921
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Mergin/processing/algs/extract_local_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from ..postprocessors import StylingPostProcessor

from ...mergin.merginproject import MerginProject

from ...mergin.deps import pygeodiff
from ...diff import (
get_local_changes,
parse_db_schema,
Expand Down Expand Up @@ -90,8 +90,10 @@ def processAlgorithm(self, parameters, context, feedback):

mp = MerginProject(project_dir)

geodiff = pygeodiff.GeoDiff()

layer_path = layer.source().split("|")[0]
diff_path = get_local_changes(layer_path, mp)
diff_path = get_local_changes(geodiff, layer_path, mp)
feedback.setProgress(5)

if diff_path is None:
Expand All @@ -107,7 +109,7 @@ def processAlgorithm(self, parameters, context, feedback):
parameters, self.OUTPUT, context, fields, layer.wkbType(), layer.sourceCrs()
)

diff = parse_diff(diff_path)
diff = parse_diff(geodiff, diff_path)
feedback.setProgress(15)

if diff and table_name in diff.keys():
Expand Down

0 comments on commit 14af921

Please sign in to comment.