From fb48ee932d4232b15c8fb8ccda77579789b4342b Mon Sep 17 00:00:00 2001 From: Thiago Augusto Date: Tue, 2 Dec 2025 16:49:48 -0300 Subject: [PATCH] Fixed error when firebird 2.5 --- sqlalchemy_firebird/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sqlalchemy_firebird/base.py b/sqlalchemy_firebird/base.py index f74399e..981104b 100644 --- a/sqlalchemy_firebird/base.py +++ b/sqlalchemy_firebird/base.py @@ -422,7 +422,11 @@ def _render_string_type(self, type_, name, length_override=None): charset = fb_types.NATIONAL_CHARSET collation = None - text = text + (length and "(%d)" % length or "") + if length == 'NONE': + length = 0 + text = str(text + (length and "(%d)" % length)) + else: + text = text + (length and "(%d)" % length or "") if charset is not None: text += f" CHARACTER SET {charset}"