tanishqgandhi1908 commented on code in PR #9226:
URL: https://github.com/apache/texera/pull/9226#discussion_r4596557333
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/hub/HubResource.scala:
##########
@@ -418,7 +418,9 @@ class HubResource {
.returning(viewCountColumn)
.fetchOne()
- recordUserAction(request, userId, entityID, entityType, View)
+ // An anonymous viewer has no user row, so the view is recorded with a
NULL uid.
+ val viewerUid = Option(userId).filter(_.intValue() > 0).orNull
+ recordUserAction(request, viewerUid, entityID, entityType, View)
Review Comment:
Done. postView now runs the count bump and the user_action insert in one
SqlServer.withTransaction, and recordUserAction takes the transaction’s
context.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]