Skip to content

Commit

Permalink
chore: fetch creator details before fetching metadata sources as they… (
Browse files Browse the repository at this point in the history
#174)

chore: fetch creator details before fetching metadata sources as they are helpful

Co-authored-by: anjali.agarwal <[email protected]>
  • Loading branch information
anjali9791 and anjaliagg9791 authored Aug 21, 2024
1 parent 284b971 commit 2461f9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/appeal/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,13 @@ func (s *Service) Create(ctx context.Context, appeals []*domain.Appeal, opts ...
return err
}

if err := s.populateAppealMetadata(ctx, appeal, policy); err != nil {
return fmt.Errorf("getting appeal metadata: %w", err)
}

if err := s.addCreatorDetails(ctx, appeal, policy); err != nil {
return fmt.Errorf("getting creator details: %w", err)
}

if err := s.populateAppealMetadata(ctx, appeal, policy); err != nil {
return fmt.Errorf("getting appeal metadata: %w", err)
}

appeal.Revision = 0
if err := appeal.ApplyPolicy(policy); err != nil {
Expand Down

0 comments on commit 2461f9e

Please sign in to comment.