Skip to content

Commit

Permalink
Allow empty lrs-statements anyways
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinqian00 committed Aug 27, 2024
1 parent 6f01e8d commit 63614c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions src/xapi_schema/spec.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1326,13 +1326,8 @@
(some-> s :statement/object :statement-ref/objectType)
true)))))

;; Statement batches in general, e.g. when being inserted into an LRS, should
;; allow empty arrays.

;; Statement batches being retrieved from an LRS should always be non-emtpy.

(s/def ::statements
(s/coll-of ::statement :into []))

(s/def ::lrs-statements
(s/coll-of ::lrs-statement :into [] :min-count 1))
(s/coll-of ::lrs-statement :into []))
1 change: 0 additions & 1 deletion test/xapi_schema/spec_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -636,5 +636,4 @@
(testing "LRS retrieval statement batch"
(should-satisfy+ ::xs/lrs-statements
[d/statement] ; This statement has ID and other required fields
:bad
[])))

0 comments on commit 63614c7

Please sign in to comment.