aboutsummaryrefslogtreecommitdiffstats
path: root/web/api/read
diff options
context:
space:
mode:
authorLasse Haugen <haugen.lasse@gmail.com>2023-04-05 22:35:38 +0200
committerLasse Haugen <haugen.lasse@gmail.com>2023-04-07 18:43:03 +0200
commit4cf3c338ad7bc5b171eb3b7d18c8d5494ac1a6df (patch)
treeae7bc513d81c0abb6cba7f8c7f530cf569ee72fd /web/api/read
parent73712230cccb52757abdf3b3197b441ee301638a (diff)
tg23 fixtg23
Diffstat (limited to 'web/api/read')
-rwxr-xr-xweb/api/read/oplog7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/api/read/oplog b/web/api/read/oplog
index 88a7616..22e21ac 100755
--- a/web/api/read/oplog
+++ b/web/api/read/oplog
@@ -17,9 +17,12 @@ my $query = $nms::web::dbh->prepare('select id,date_trunc(\'second\',time) as ti
$query->execute();
while (my $ref = $query->fetchrow_hashref()) {
my %meh;
+ if (!defined($ref->{'log'})) {
+ next;
+ }
$meh{'time'} = $ref->{'h'} . ":" . $ref->{'m'};
- $meh{'log'} = $ref->{'log'};
- $meh{'username'} = $ref->{'username'};
+ $meh{'log'} = $ref->{'log'} || "weird?";
+ $meh{'username'} = $ref->{'username'} || "undefined";
$meh{'id'} = $ref->{'id'};
$meh{'systems'} = $ref->{'systems'};
$meh{'timestamp'} = $ref->{'timestamp'};