]> git.donarmstrong.com Git - debbugs.git/commitdiff
use schema_argument
authorDon Armstrong <don@donarmstrong.com>
Fri, 8 Jun 2018 20:36:36 +0000 (13:36 -0700)
committerDon Armstrong <don@donarmstrong.com>
Fri, 8 Jun 2018 20:36:36 +0000 (13:36 -0700)
Debbugs/Bug.pm
Debbugs/Package.pm

index 4a6bf6614e27ca557e65fa1d439c6b447defeca6..256084eccdc26ef41b9416e72e8d02a22550987b 100644 (file)
@@ -107,10 +107,7 @@ has correspondent_collection =>
     );
 sub _build_correspondent_collection   {
     my $self = shift;
-    if ($self->has_schema) {
-        return Debbugs::Collection::Correspondent->new(schema => $self->schema);
-    }
-    return Debbugs::Collection::Correspondent->new();
+    return Debbugs::Collection::Correspondent->new($self->schema_argument);
 }
 
 sub reset {
index f3cf1056d58ee77b64e8e9f6ad9911ef59bc0a80..71a261937184d0083a0ffbc6748458404e013cd9 100644 (file)
@@ -578,7 +578,7 @@ sub _create_version {
                    new(package => $self,
                        version => $v,
                        package_collection => $self->package_collection,
-                        $self->has_schema?(schema => $self->schema):(),
+                        $self->schema_argument,
                       );
        }
     } else {
@@ -589,7 +589,7 @@ sub _create_version {
                    new(package => $self,
                        version => $v,
                        package_collection => $self->package_collection,
-                        $self->has_schema?(schema => $self->schema):(),
+                        $self->schema_argument,
                       );
        }
     }
@@ -605,7 +605,7 @@ has 'package_collection' => (is => 'ro',
 
 sub _build_package_collection {
     my $self = shift;
-    return Debbugs::Collection::Package->new($self->has_schema?(schema => $self->schema):());
+    return Debbugs::Collection::Package->new($self->schema_argument)
 }
 
 sub CARP_TRACE {