datafly icon indicating copy to clipboard operation
datafly copied to clipboard

render-json fails on table row with optional relationship

Open daninus14 opened this issue 4 years ago • 0 comments

render-json fails with an unbound slot error on a table row with an optional relationship, when the row has a null value for the relationship field.

The functions called are (datafly.json::convert-for-json) and (datafly.json:encode-json)

To reproduce table with mito:

(mito:deftable tweet () ((text :col-type (:varchar 64)) (author :col-type (or user :null))))

Then (render-json tweet) will fail if the user is :null with an unbound slot error.

note: I would've forked and submitted a fix / pull-request but I'm relatively new to lisp...

daninus14 avatar Aug 04 '21 16:08 daninus14