File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
openwisp_controller/config/static/config/js Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 235235 $ . extend ( options , JSON . parse ( field . attr ( "data-options" ) ) ) ;
236236 }
237237
238- ipAddrMaxLengthWorkaround ( startval , options . schema ) ;
238+ varValidationWorkaround ( startval , options . schema ) ;
239239 editor = new JSONEditor ( document . getElementById ( id ) , options ) ;
240240 django . _jsonEditors [ id ] = editor ;
241241 // initialise advanced json editor here (disable schema validation in VPN admin)
435435 // deletes maxLength on ip address schema if address contains variable
436436 // this workaround is necessary until we rewrite the config UI to
437437 // deal with variables properly
438- var ipAddrMaxLengthWorkaround = function ( value , schema ) {
438+ var varValidationWorkaround = function ( value , schema ) {
439439 if ( value && value . interfaces ) {
440440 $ . each ( value . interfaces , function ( i , interf ) {
441441 if ( interf . addresses ) {
448448 }
449449 } ) ;
450450 }
451+ if ( interf . wireless && interf . wireless . bssid && interf . wireless . bssid . indexOf ( '{{' ) > - 1 ) {
452+ try {
453+ delete schema . definitions . bssid_wireless_property . properties . bssid . pattern ;
454+ } catch ( e ) { }
455+ }
451456 } ) ;
452457 }
453458 } ;
You can’t perform that action at this time.
0 commit comments