mirror of
https://github.com/NaN-tic/trytond-galatea_tutorial.git
synced 2023-12-14 02:32:55 +01:00
Follow PEP-0249 for Transaction and backends
This commit is contained in:
parent
5e7e44c1a2
commit
ac9bdc886e
1 changed files with 2 additions and 2 deletions
|
@ -161,7 +161,7 @@ class GalateaTutorial(ModelSQL, ModelView):
|
|||
return len(self.comments)
|
||||
|
||||
def get_thumb(self, name):
|
||||
db_name = Transaction().cursor.dbname
|
||||
db_name = Transaction().database.name
|
||||
filename = self.thumb_filename
|
||||
if not filename:
|
||||
return None
|
||||
|
@ -191,7 +191,7 @@ class GalateaTutorial(ModelSQL, ModelView):
|
|||
galatea_config = Config(1)
|
||||
size = galatea_config.tutorial_thumb_size or 300
|
||||
crop = galatea_config.tutorial_thumb_crop
|
||||
db_name = Transaction().cursor.dbname
|
||||
db_name = Transaction().database.name
|
||||
galatea_dir = os.path.join(
|
||||
config.get('database', 'path'), db_name, 'galatea', 'tutorial')
|
||||
|
||||
|
|
Loading…
Reference in a new issue