anchor.diff:      {ok, Results} = sqerl:adhoc_select([name, authz_id, org_id],
                                          groups,
                                          {'and', [{name, equals, Group}, {org_id, equals, OrgId}]}),
  -    GroupFieldsList = hd(Results),
  -    {<<"authz_id">>, AuthzId} = proplists:lookup(<<"authz_id">>, GroupFieldsList),
  -    add_cache(Cache,{group, Group}, AuthzId).
  +    case Results of
  +        [] ->
  +            lager:info("No matching group ~p for org id ~p", [Group, OrgId]),
  +            Cache;
  +        _ ->
  +            GroupFieldsList = hd(Results),
  +            {<<"authz_id">>, AuthzId} = proplists:lookup(<<"authz_id">>, GroupFieldsList),
  +            add_cache(Cache,{group, Group}, AuthzId)
  +    end.
   
   %%
   %% Execute a policy to create an org
  
positive.code: %%
  %% Code in here is vendored and then modified to remove external dependencies.
  %% This makes the data migration resilent to future code changes that might
  %% break the migration.
  %%
  %% TODO: remove use of these:
  
negative.code:          }
          ]).
  
  needs_account_dets() ->
      false.
  
  migration_init() ->
      %% TODO: this fails if the pool is already created. Should be tolerant of
      %% errors and also should tear this down after the migration
      mv_oc_chef_authz_http:create_pool(),
      SuperUserAuthzId = envy:get(oc_chef_authz,authz_superuser_id, binary),
      Superuser = #mover_requestor{authz_id = SuperUserAuthzId},
  
      FindOrgsWithNoPoliciesContainer = <<"SELECT orgs.name, orgs.id, orgs.authz_id FROM orgs "
                                          "LEFT JOIN containers ON orgs.id = org_id AND containers.name='policies' "
  