quiet logs when authtoken doesn't exist
authorChris Sharp <csharp@georgialibraries.org>
Mon, 30 Jan 2023 18:03:42 +0000 (13:03 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 30 Jan 2023 18:03:42 +0000 (13:03 -0500)
Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm

index dab85c0..75ffdf7 100644 (file)
@@ -160,11 +160,14 @@ sub log {
 # -----------------------------------------------------------------------------
 sub checkauth {
     my $self = shift;
-    $self->log(D, "checking auth token ".$self->authtoken);
+    my $content;
+    if ( $self->authtoken ) {
+        $self->log(D, "checking auth token ".$self->authtoken);
 
-    my $content = $U->simplereq( 
-        'open-ils.auth', 
-        'open-ils.auth.session.retrieve', $self->authtoken, 1);
+        $content = $U->simplereq( 
+            'open-ils.auth', 
+            'open-ils.auth.session.retrieve', $self->authtoken, 1);
+    }
 
     if(!$content or $U->event_code($content)) {
         $self->event( ($content) ? $content : OpenILS::Event->new('NO_SESSION'));