public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin4][RM3693] Message "Error saving properties Click on Detail" displayed if user create server group with same name
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin4][RM3693] Message "Error saving properties Click on Detail" displayed if user create server group with same name
@ 2019-01-15 05:50 Aditya Toshniwal <[email protected]>
2019-01-15 13:10 ` Re: [pgAdmin4][RM3693] Message "Error saving properties Click on Detail" displayed if user create server group with same name Akshay Joshi <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Aditya Toshniwal @ 2019-01-15 05:50 UTC (permalink / raw)
To: pgadmin-hackers
Hi Hackers,
Attached is the patch to fix back end exception which is common and
mentioned in SQLAlchemy FAQ -
https://docs.sqlalchemy.org/en/latest/faq/sessions.html#this-session-s-transaction-has-been-rolled-b...
The fix is as per the FAQ answer.
Kindly review.
--
Thanks and Regards,
Aditya Toshniwal
Software Engineer | EnterpriseDB Software Solutions | Pune
"Don't Complain about Heat, Plant a tree"
Attachments:
[application/octet-stream] RM3693.patch (1.6K, 3-RM3693.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/__init__.py b/web/pgadmin/browser/server_groups/__init__.py
index 5b80eefc..25addfd0 100644
--- a/web/pgadmin/browser/server_groups/__init__.py
+++ b/web/pgadmin/browser/server_groups/__init__.py
@@ -145,6 +145,7 @@ class ServerGroupView(NodeView):
db.session.delete(sg)
db.session.commit()
except Exception as e:
+ db.session.rollback()
return make_json_response(
status=410, success=0, errormsg=e.message
)
@@ -178,10 +179,12 @@ class ServerGroupView(NodeView):
servergroup.name = data[u'name']
db.session.commit()
except exc.IntegrityError:
+ db.session.rollback()
return bad_request(gettext(
"The specified server group already exists."
))
except Exception as e:
+ db.session.rollback()
return make_json_response(
status=410, success=0, errormsg=e.message
)
@@ -251,11 +254,13 @@ class ServerGroupView(NodeView):
)
)
except exc.IntegrityError:
+ db.session.rollback()
return bad_request(gettext(
"The specified server group already exists."
))
except Exception as e:
+ db.session.rollback()
return make_json_response(
status=410,
success=0,
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin4][RM3693] Message "Error saving properties Click on Detail" displayed if user create server group with same name
2019-01-15 05:50 [pgAdmin4][RM3693] Message "Error saving properties Click on Detail" displayed if user create server group with same name Aditya Toshniwal <[email protected]>
@ 2019-01-15 13:10 ` Akshay Joshi <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2019-01-15 13:10 UTC (permalink / raw)
To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers
Thanks patch applied.
On Tue, Jan 15, 2019 at 11:20 AM Aditya Toshniwal <
[email protected]> wrote:
> Hi Hackers,
>
> Attached is the patch to fix back end exception which is common and
> mentioned in SQLAlchemy FAQ -
> https://docs.sqlalchemy.org/en/latest/faq/sessions.html#this-session-s-transaction-has-been-rolled-b...
> The fix is as per the FAQ answer.
>
> Kindly review.
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> Software Engineer | EnterpriseDB Software Solutions | Pune
> "Don't Complain about Heat, Plant a tree"
>
--
*Akshay Joshi*
*Sr. Software Architect *
*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-01-15 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 05:50 [pgAdmin4][RM3693] Message "Error saving properties Click on Detail" displayed if user create server group with same name Aditya Toshniwal <[email protected]>
2019-01-15 13:10 ` Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox