zephyring commented on code in PR #25031:
URL: https://github.com/apache/superset/pull/25031#discussion_r1302239637


##########
superset/models/dashboard.py:
##########
@@ -96,6 +96,7 @@ def copy_dashboard(_mapper: Mapper, connection: Connection, 
target: Dashboard) -
     )
     session.add(extra_attributes)
     session.commit()
+    session.close()

Review Comment:
   if we really need to use this session, better to wrap into try/catch and 
close at final otherwise exceptions thrown in commit will skip session.close



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to