Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix problems introduced by previous commit.

  • Loading branch information...
commit e4ff48442c3582664ca45fb0ed79e9c02af5221f 1 parent af7c8e3
Dave Cross authored July 24, 2013
4  PoliticalWeb/lib/PoliticalWeb/Constituency.pm
@@ -58,6 +58,8 @@ sub new_from_name {
58 58
   my $twfy = _get_from_cache($name) || _get_from_twfy($name);
59 59
   my $db   = _get_from_db($name);
60 60
 
  61
+  return unless $twfy && $db;
  62
+
61 63
   return $class->new({ twfy => $twfy, db => $db });
62 64
 }
63 65
 
@@ -101,4 +103,4 @@ sub get_mp {
101 103
   return $mp;  
102 104
 }
103 105
 
104  
-1;
  106
+1;
2  PoliticalWeb/lib/PoliticalWeb/Mp.pm
@@ -33,6 +33,8 @@ sub new_from_constituency_name {
33 33
   my $twfy = _get_from_cache($constit_name) || _get_from_twfy($constit_name);
34 34
   my $db   = _get_from_db($constit_name, $twfy);
35 35
 
  36
+  return unless $twfy && $db;
  37
+
36 38
   return $class->new({ twfy => $twfy, db => $db });
37 39
 }
38 40
 

0 notes on commit e4ff484

Please sign in to comment.
Something went wrong with that request. Please try again.