alerts: PEP8/257 improvements in models

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
search: UserQuery relationship addition

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>