events: ensure all models' __str__ can be called without any further lookups (#9480)
* events: ensure all models' __str__ can be called without any further lookups Signed-off-by: Jens Langhammer <jens@goauthentik.io> * allow for additional queries for models using default_token_key Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
		@ -556,7 +556,7 @@ class Notification(SerializerModel):
 | 
			
		||||
            if len(self.body) > NOTIFICATION_SUMMARY_LENGTH
 | 
			
		||||
            else self.body
 | 
			
		||||
        )
 | 
			
		||||
        return f"Notification for user {self.user}: {body_trunc}"
 | 
			
		||||
        return f"Notification for user {self.user_id}: {body_trunc}"
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
        verbose_name = _("Notification")
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user