<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_registered_subject_from_model_on_post_save(sender, instance, raw, created, using, **kwargs):
 """Updates RegisteredSubject from models using UpdatesOrCreatesRegistrationModelMixin."""

    if not raw and not kwargs.get('update_fields'):
        try:
            instance.registration_update_or_create()
        except AttributeError as e:
            if 'registration_update_or_create' not in str(e):
                raise AttributeError(str(e))