Skip to content

Transaction not always created #113

@tvuotila

Description

@tvuotila

Transaction table row is not created if the transaction values is empty. I would argue that transaction should always be created in order to tie related activity table rows together. The current implementation is really explicit about not creating the row, thus I would like to know if there is some reason for it.

values = convert_callables(self.get_transaction_values())
if values:
values['native_transaction_id'] = sa.func.txid_current()
values['issued_at'] = sa.text("now() AT TIME ZONE 'UTC'")
stmt = (
insert(table)
.values(**values)
.on_conflict_do_nothing(
constraint='transaction_unique_native_tx_id'
)
)
session.execute(stmt)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions