Closed danielballan closed 4 years ago
Per discussion on slack, the problem here isn't that we would have empty uids and times, it is that without at least one Event
we can not infer the descriptor, To quote @danielballan
In summary, an empty EventPage is OK, but an EventPage will a NULL descriptor field is not OK.
I have a very weak preference that the wording in the exceptions be changed to reflect this, but will not block merging on that.
Currently, calling
pack_event_page()
with no arguments hits an unexpected code path and thus fails likeThis PR causes it to raise with a more describing
ValueError
. It is not possible to pack an "empty" Event Page because an Event Page must have a time and a uid.The situation in the same for Datum Page, which must have a Resource. That is also addressed here.
Tests included, should be good to merge.