def _ValidateUpdateFollower(tester, user_cookie, op_dict, foll_dict):
 validator = tester.validator
 (user_id, device_id) = tester.GetIdsFromCookie(user_cookie)
 viewpoint_id = foll_dict['viewpoint_id']
 has_viewed_seq = ('viewed_seq' in foll_dict)
 if has_viewed_seq:
  update_seq = validator.GetModelObject(Viewpoint, viewpoint_id).update_seq
  old_viewed_seq = validator.GetModelObject(Follower, DBKey(user_id, viewpoint_id)).viewed_seq
  if (foll_dict['viewed_seq'] > update_seq):
   foll_dict['viewed_seq'] = update_seq
  if (foll_dict['viewed_seq'] < old_viewed_seq):
   del foll_dict['viewed_seq']
 foll_dict['user_id'] = user_id
 follower = validator.ValidateUpdateDBObject(Follower, **foll_dict)
 invalidate = {'viewpoints': [{'viewpoint_id': viewpoint_id, 'get_attributes': True}]}
 if (has_viewed_seq and ('labels' not in foll_dict)):
  invalidate = None
 validator.ValidateNotification('update_follower', user_id, op_dict, invalidate, viewpoint_id=viewpoint_id, seq_num_pair=(None, (follower.viewed_seq if has_viewed_seq else None)))

def _ValidateUpdateFollower ( tester , user_cookie , op_dict , foll_dict ) : validator = tester . validator ( user_id , device_id ) = tester . GetIdsFromCookie ( user_cookie ) viewpoint_id = foll_dict [ 'viewpoint_id' ] has_viewed_seq = ( 'viewed_seq' in foll_dict ) if has_viewed_seq : update_seq = validator . GetModelObject ( Viewpoint , viewpoint_id ) . update_seq old_viewed_seq = validator . GetModelObject ( Follower , DBKey ( user_id , viewpoint_id ) ) . viewed_seq if ( foll_dict [ 'viewed_seq' ] > update_seq ) : foll_dict [ 'viewed_seq' ] = update_seq if ( foll_dict [ 'viewed_seq' ] < old_viewed_seq ) : del foll_dict [ 'viewed_seq' ] foll_dict [ 'user_id' ] = user_id follower = validator . ValidateUpdateDBObject ( Follower , ** foll_dict ) invalidate = { 'viewpoints' : [ { 'viewpoint_id' : viewpoint_id , 'get_attributes' : True } ] } if ( has_viewed_seq and ( 'labels' not in foll_dict ) ) : invalidate = None validator . ValidateNotification ( 'update_follower' , user_id , op_dict , invalidate , viewpoint_id = viewpoint_id , seq_num_pair = ( None , ( follower . viewed_seq if has_viewed_seq else None ) ) )
validates the results of a call to update_follower .