Skip to content

Commit 68cbfdb

Browse files
fix(FirewallRule): default dscp to null
1 parent 05e3d0f commit 68cbfdb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/FirewallRule.inc‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class FirewallRule extends Model {
3535
public StringField $descr;
3636
public BooleanField $disabled;
3737
public BooleanField $log;
38+
public StringField $dscp;
3839
public StringField $tag;
3940
public StringField $statetype;
4041
public BooleanField $tcp_flags_any;
@@ -192,8 +193,9 @@ class FirewallRule extends Model {
192193
help_text: 'Enable or disable logging of traffic that matches this rule.',
193194
);
194195
$this->dscp = new StringField(
195-
default: '',
196+
default: null,
196197
choices: [
198+
'',
197199
'af11',
198200
'af12',
199201
'af13',
@@ -220,6 +222,7 @@ class FirewallRule extends Model {
220222
'0x04',
221223
],
222224
allow_empty: true,
225+
allow_null: true,
223226
verbose_name: 'DSCP',
224227
help_text: 'The DSCP value this firewall rule should match.',
225228
);

0 commit comments

Comments
 (0)