We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c97107a commit e693f31Copy full SHA for e693f31
services/project/backup.go
@@ -305,14 +305,15 @@ func (b *BackupDB) format() (*BackupFormat, error) {
305
Inventory, _ = findNameByID[db.Inventory](*o.InventoryID, b.inventories)
306
}
307
308
- surveyVars := make([]db.SurveyVar, 0)
309
- err := json.Unmarshal([]byte(*o.SurveyVarsJSON), &surveyVars)
310
- if err != nil {
311
- return nil, err
+ if o.SurveyVarsJSON != nil {
+ surveyVars := make([]db.SurveyVar, 0)
+ err := json.Unmarshal([]byte(*o.SurveyVarsJSON), &surveyVars)
+ if err != nil {
312
+ return nil, err
313
+ }
314
+ o.SurveyVars = surveyVars
315
316
- o.SurveyVars = surveyVars
-
317
templates[i] = BackupTemplate{
318
Template: o,
319
View: View,
0 commit comments