Skip to content

Error: Object of type datetime is not JSON serializable #146

@matthew-a-dunlap

Description

@matthew-a-dunlap

Hello!

This project is great. I've run into an issue though. I was trying to run this (unfinished) query:

select m.id, m.pub_name, m.pub_id, m.contents_restricted, 
	array_agg(s.updated_at) as sub_dates
from main_manuscript m
left join main_submission s on m.id=s.manuscript_id
group by m.id, m.pub_name, m.pub_id, m.contents_restricted
order by m.id

The problem is that django-sql-dashboard errors out because it doesn't know how to serialize the s.updated_at DateTime field for working with array_agg.

As far as I could tell the only way to fix this would be to fork the codebase? Am I missing something? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions