Skip to content

Commit

Permalink
change last_used_database on connection save when database/service na…
Browse files Browse the repository at this point in the history
…me is changed
  • Loading branch information
plucik committed Feb 4, 2025
1 parent bb14d70 commit ea4c612
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pgmanage/app/views/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ def save_connection(request, session):
conn.technology = Technology.objects.get(name=conn_object['technology'])
conn.server = conn_object['server']
conn.port = conn_object['port']
if conn.database != conn_object['service']:
conn.last_used_database = conn_object['service']
conn.database = conn_object['service']
conn.username = conn_object['user']

Expand Down

0 comments on commit ea4c612

Please sign in to comment.