- # FIXME use seen_names
- my $rowno = 8; # zero-indexed
- my $found = 0;
- for my $row (@$main_sheet_rows) {
- my $colno = 0;
- for my $val (@{$row->{'values'}}) {
- my $name = get_spreadsheet_name($val);
- if (defined($name) && $real_name eq $name) {
- push @yellow_updates, {
- updateCells => {
- rows => [{
- values => [{
- userEnteredFormat => $diff->[1]
- }]
- }],
- fields => 'userEnteredFormat.backgroundColor',
- range => {
- sheetId => $tab_id,
- startRowIndex => $rowno,
- endRowIndex => $rowno + 1,
- startColumnIndex => $colno,
- endColumnIndex => $colno + 1
- }
- }
- };
- $found = 1;
- }
- ++$colno;
- }
- ++$rowno;
- }
-
- if ($found) {
- } else {
+ if (!exists($seen_names{lc $real_name})) {
+ # This can only happen on deletes; we don't add such cases to the positive diff.
+ # FIXME we'd still delete them from the database.