File tree 3 files changed +23
-1
lines changed
3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,6 @@ TODOs:
140
140
- multi-delete must ignore all attributes except id and epoch
141
141
- fix init.sql, it's too slow due to latest xref stuff in commit 9c583e7
142
142
- add support for inline=endpoints.*
143
- - ban the use of ^ in ifvalue VALUES for now
144
143
- support ETag/If-Match
145
144
- update epoch/modifiedat of parent when nested entity is added/removed
146
145
- ?nested isn't needed to update ` model ` or ` meta ` attributes
Original file line number Diff line number Diff line change @@ -2390,6 +2390,11 @@ func (attrs Attributes) Verify(ld *LevelData) error {
2390
2390
return fmt .Errorf ("%q has an empty ifvalues key" , ld .Path .UI ())
2391
2391
}
2392
2392
2393
+ if valStr [0 ] == '^' {
2394
+ return fmt .Errorf ("%q has an ifvalues key that starts " +
2395
+ "with \" ^\" " , ld .Path .UI ())
2396
+ }
2397
+
2393
2398
nextLD := & LevelData {
2394
2399
ld .Model ,
2395
2400
ld .AttrNames ,
Original file line number Diff line number Diff line change @@ -4919,6 +4919,24 @@ func TestHTTPIfValue(t *testing.T) {
4919
4919
})
4920
4920
xCheckErr (t , err , "" )
4921
4921
4922
+ _ , err = reg .Model .AddAttribute (& registry.Attribute {
4923
+ Name : "badone" ,
4924
+ Type : registry .INTEGER ,
4925
+ IfValues : registry.IfValues {
4926
+ "" : & registry.IfValue {},
4927
+ },
4928
+ })
4929
+ xCheckErr (t , err , "\" model\" has an empty ifvalues key" )
4930
+
4931
+ _ , err = reg .Model .AddAttribute (& registry.Attribute {
4932
+ Name : "badone" ,
4933
+ Type : registry .INTEGER ,
4934
+ IfValues : registry.IfValues {
4935
+ "^6" : & registry.IfValue {},
4936
+ },
4937
+ })
4938
+ xCheckErr (t , err , "\" model\" has an ifvalues key that starts with \" ^\" " )
4939
+
4922
4940
xCheckHTTP (t , reg , & HTTPTest {
4923
4941
Name : "PUT reg - ifvalue - 1" ,
4924
4942
URL : "" ,
You can’t perform that action at this time.
0 commit comments