Skip to content

Process validation report fails when service date fields are empty #971

@davidgamez

Description

@davidgamez

Describe the bug

The process validation report is failing in cases where the service date fields have empty values.

Steps/Code to Reproduce

Example failing function, link

Expected Results

The function supports empty string values in the service date values.

Actual Results

Function exits with SQL update error.

Error creating validation report entities: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
(psycopg2.errors.InvalidDatetimeFormat) invalid input syntax for type date: ""
LINE 1: UPDATE gtfsdataset SET service_date_range_start='', service_...
                                                        ^

[SQL: UPDATE gtfsdataset SET service_date_range_start=%(service_date_range_start)s, service_date_range_end=%(service_date_range_end)s WHERE gtfsdataset.id = %(gtfsdataset_id)s]
[parameters: {'service_date_range_start': '', 'service_date_range_end': '', 'gtfsdataset_id': '

Screenshots

No response

Files used

No response

Additional notes

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions