[chronojump] Importer imports triggers
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Importer imports triggers
- Date: Fri, 8 Nov 2019 17:36:22 +0000 (UTC)
commit dab1730e9cf3414c5b6297ecff4e3ec18108b2d1
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Nov 8 18:36:08 2019 +0100
Importer imports triggers
src/chronojump-importer/chronojump_importer.py | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/src/chronojump-importer/chronojump_importer.py b/src/chronojump-importer/chronojump_importer.py
index 6de55557..4ce4b754 100755
--- a/src/chronojump-importer/chronojump_importer.py
+++ b/src/chronojump-importer/chronojump_importer.py
@@ -667,6 +667,15 @@ class ImportSession:
avoids_duplicate_column=None,
matches_columns=None)
+ # Imports trigger (can be encoder or forceSensor, but right now only encoder is programmed)
+ trigger = self.source_db.read(table_name="trigger",
+ where_condition="mode='ENCODER' AND
Encoder.sessionID={}".format(self.source_session),
+ join_clause="LEFT JOIN Encoder ON Encoder.uniqueID=trigger.modeID")
+
+ trigger.update_ids("modeID", encoder, "uniqueID", "new_uniqueID")
+ self.destination_db.write(table=trigger, matches_columns=None)
+
+
def _import_forceSensor(self):
# Imports ForceSensorExercise
# based on encoder exercise code because rest of the code exercises and tests are linked by names
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]