Skip to content

Commit

Permalink
fix raise notice (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored Apr 9, 2024
1 parent b042487 commit ef3a073
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pirogue/multiple_inheritance.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,8 @@ def __insert_trigger(self) -> str:
raise_notice=(
"NULL;"
if self.allow_parent_only
else "RAISE NOTICE '{vn} type not known ({percent_char})', NEW.{type_name}; -- ERROR".format(
else "RAISE NOTICE '{vn} type not known (%)', NEW.{type_name}; -- ERROR".format(
vn=self.view_name,
percent_char=(
"%%" if self.variables else "%"
), # if variables, % should be escaped because cursor.execute is run with variables
type_name=self.type_name,
)
),
Expand Down Expand Up @@ -586,11 +583,8 @@ def __update_trigger(self):
raise_notice=(
"NULL;"
if self.allow_parent_only
else "RAISE NOTICE '{vn} type not known ({percent_char})', NEW.{type_name}; -- ERROR".format(
else "RAISE NOTICE '{vn} type not known (%)', NEW.{type_name}; -- ERROR".format(
vn=self.view_name,
percent_char=(
"%%" if self.variables else "%"
), # if variables, % should be escaped because cursor.execute is run with variables
type_name=self.type_name,
)
),
Expand Down

0 comments on commit ef3a073

Please sign in to comment.