Skip to content

Commit eef5950

Browse files
authored
Fix Traceback when using reaodnly_transaction decorator for objects with no __name__ (senaite#2143)
* Fix Traceback when using decorator for objects with no __name__ * Changelog
1 parent 1713351 commit eef5950

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.rst

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Changelog
55
2.3.0 (unreleased)
66
------------------
77

8+
- #2143 Fix Traceback when using readonly decorator for objects w/o __name__
89
- #2140 Allow to enable/disable analysis categories for samples
910
- #2137 Dynamic Workflow Menu
1011
- #2139 Fix LabClerk cannot create partitions from received samples

src/senaite/core/decorators/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def readonly_transaction(func):
1616
@wraps(func)
1717
def decorator(self, *args, **kwargs):
1818
logger.info("*** READONLY TRANSACTION: '{}.{}' ***".
19-
format(self.__class__.__name__, self.__name__))
19+
format(self.__class__.__name__, func.__name__))
2020
tx = transaction.get()
2121
tx.doom()
2222
return func(self, *args, **kwargs)

0 commit comments

Comments
 (0)