Fix AttributeError due to the limitation of no anonymous foreignkeyfield
Signed-off-by: JohnMave126 <johnmave126@gmail.com>