File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,18 @@ def get_variable(self):
93
93
94
94
elif self .variable_view .create_variable_radio .GetValue ():
95
95
# v = self.createdVar
96
- pass
96
+ v = self .get_new_variable ()
97
+
98
+ return v
99
+
100
+ def get_new_variable (self ):
101
+ v = Variable ()
102
+ v .code = self .variable_view .variable_code_text_ctrl .GetValue () if self .variable_view .variable_code_text_ctrl .GetValue () <> "" else None
103
+ v .name = self .variable_view .variable_name_combo .GetValue () if self .variable_view .variable_name_combo .GetValue () <> "" else None
104
+ v .speciation = self .variable_view .speciation_combo .GetValue () if self .variable_view .speciation_combo .GetValue () <> "" else None
105
+ v .variable_unit = self .service_manager .get_series_service ()
106
+ v .no_data_value = self .variable_view .no_data_value_text_ctrl .GetValue () if self .variable_view .no_data_value_text_ctrl .GetValue () <> "" else None
107
+ # Need unit name, time support but neither of them are in the form...
97
108
98
109
return v
99
110
You can’t perform that action at this time.
0 commit comments