changes try except block to get_or_create