<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def red_workshift(request, message=None):
    '''
    Redirects to the base workshift page for users who are logged in
    '''
    if message:
        messages.add_message(request, messages.ERROR, message)
    return HttpResponseRedirect(reverse('workshift:view_semester'))