Wappler Version : 3.5.4
Operating System : Windows 10
Server Model: ASP.NET
Database Type: MSSQL
Hosting Type: Local IIS
Expected behavior
Adding and removing conditions on the query builder should not break server action.
Actual behavior
Removing a condition from the server action results in 500 error.
"InnerException": {
"ClassName": "System.InvalidCastException",
"Message": "Unable to cast object of type 'Newtonsoft.Json.Linq.JValue' to type 'Newtonsoft.Json.Linq.JContainer'.",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": " at DMXzone.ServerConnect.Database.SqlBuilder.Parse(JObject sql) in C:\\Develop\\Server Connect\\ASPNET_Source\\DMXzone Database Connector\\Database\\SqlBuilder.cs:line 80\r\n at DMXzone.ServerConnect.Module.DbConnectorModule.Select(JObject options) in C:\\Develop\\Server Connect\\ASPNET_Source\\DMXzone Database Connector\\Module\\DbConnectorModule.cs:line 58",
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": "8\nParse\nDMXzone.ServerConnect.DatabaseConnector, Version=2.1.1.32901, Culture=neutral, PublicKeyToken=null\nDMXzone.ServerConnect.Database.SqlBuilder\nDMXzone.ServerConnect.Database.SqlBuilder Parse(Newtonsoft.Json.Linq.JObject)",
"HResult": -2147467262,
"Source": "DMXzone.ServerConnect.DatabaseConnector",
"WatsonBuckets":
},
How to reproduce
Create new query with condition. Save it. Then delete the condition and save it.
You should see the JSON produced as:
Removing the "wheres": null
from JSON manually fixes the issue.