From ca8c9d1e63dab5f61c1177da17c4f6a7b678070d Mon Sep 17 00:00:00 2001
From: BenniHome <benjamin.boesl@studium.fau.de>
Date: Wed, 26 Feb 2020 09:43:11 +0100
Subject: [PATCH] changed something in order to make scrolls work

---
 Assets/InteractionEngine/Fact.cs       | 1 +
 Assets/InventoryStuff/ScrollDetails.cs | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Assets/InteractionEngine/Fact.cs b/Assets/InteractionEngine/Fact.cs
index 77c5f250..0e67d40d 100644
--- a/Assets/InteractionEngine/Fact.cs
+++ b/Assets/InteractionEngine/Fact.cs
@@ -169,6 +169,7 @@ public OnLineFact(int i, int pid, int lid)
         AddFactResponse res = AddFactResponse.sendAdd("localhost:8081/fact/add/onLine", body);
         this.backendURI = res.factUri;
         this.backendValueURI = res.factValUri;
+        Debug.Log("created onLine" +  this.backendURI + " " + this.backendValueURI);
     }
 
 
diff --git a/Assets/InventoryStuff/ScrollDetails.cs b/Assets/InventoryStuff/ScrollDetails.cs
index 315f8354..99bf5788 100644
--- a/Assets/InventoryStuff/ScrollDetails.cs
+++ b/Assets/InventoryStuff/ScrollDetails.cs
@@ -88,11 +88,11 @@ private string sendView() {
             Fact fact_i = ParameterDisplays[i].GetComponentInChildren<DropHandling>().currentFact;
             var drophandler = ParameterDisplays[i].GetComponentInChildren<DropHandling>();
             Declaration decl_i = scroll.declarations[i];
-            jsonRequest = jsonRequest + @" """ + decl_i.identifier + @""":""" + fact_i.backendURI + @""",";
             if (decl_i.value != null && fact_i.backendValueURI != null)
             {
                 jsonRequest = jsonRequest + @" """ + decl_i.value + @""":""" + fact_i.backendValueURI + @""",";
             }
+            jsonRequest = jsonRequest + @" """ + decl_i.identifier + @""":""" + fact_i.backendURI + @""",";
         }
         //removing the last ','
         jsonRequest = jsonRequest.Substring(0, jsonRequest.Length - 1);
-- 
GitLab