LPS-39178 Asset Link Behaviour is not working for portlets on pages in User Groups' Site Template

Hey Brian,

You were right at your comment in brianchandotcom/liferay-portal#13535. As of LPS-23509 it must be checked that primaryKey > 0 to prevent exceptions. The second call to getGroupId() was therefore not only redundant but may also cause errors. I made sure the bug is still solved after performing this change.

Thanks!