Skip to content

Commit

Permalink
Fix CURRENT_TIMESTAMP breaking table creation
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-blessing committed Oct 5, 2023
1 parent 9255c40 commit 93f707d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion link/infrastructure/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ def create_table_definition_provider(table: Callable[[], dj.Table]) -> Callable[
"""Create an object that provides the definition of the table produced by the given factory when called."""

def provide_definition() -> str:
return str(table().heading)
return str(table().heading).replace('"current_timestamp()"', "CURRENT_TIMESTAMP")

return provide_definition
2 changes: 0 additions & 2 deletions tests/functional/test_creation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import datajoint as dj
import pytest

from link import link

Expand Down Expand Up @@ -31,7 +30,6 @@ def test_local_table_creation_from_source_table_that_has_parent_raises_no_error(
)(type(source_table_name, (dj.Manual,), {}))


@pytest.mark.xfail()
def test_local_table_creation_from_source_table_that_uses_current_timestamp_default_raises_no_error(
prepare_link, create_table, prepare_table, databases, configured_environment, connection_config
):
Expand Down

0 comments on commit 93f707d

Please sign in to comment.