Skip to content

Commit 91798a5

Browse files
fix: importing uploaded files on producers platform (#7586)
1 parent d7b89d7 commit 91798a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ProductOpener/Import.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,9 @@ sub import_csv_file ($args_ref) {
603603
# e.g. if an org has loaded fresh data manually or through Equadis,
604604
# don't overwrite it with potentially stale CodeOnline or USDA data
605605

606-
if (defined $args_ref->{source_id}) {
606+
# For files uploaded through the producers platform, the source_id is org-[id of org]
607+
608+
if ((defined $args_ref->{source_id}) and ($args_ref->{source_id} ne "org-${org_id}")) {
607609
if (not $org_ref->{"import_source_" . $args_ref->{source_id}}) {
608610
$log->debug(
609611
"skipping import for org without authorization for the source",

0 commit comments

Comments
 (0)