'Create a snapshot of course access rules when the rules are updated.'

@staticmethod
def snapshot_post_save_receiver(sender, instance, **kwargs):

    if isinstance(instance, RestrictedCourse):
        CourseAccessRuleHistory.save_snapshot(instance)
    elif isinstance(instance, CountryAccessRule):
        CourseAccessRuleHistory.save_snapshot(instance.restricted_course)
