mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-20 13:28:20 +02:00
Remove db property for profile has no private key (#1680)
This commit is contained in:
parent
3fc34c8965
commit
0173cc90a4
1 changed files with 2 additions and 6 deletions
|
|
@ -146,10 +146,6 @@ class SqueakDb:
|
|||
def profile_has_private_key(self):
|
||||
return self.profiles.c.private_key != None # noqa: E711
|
||||
|
||||
@property
|
||||
def profile_has_no_private_key(self):
|
||||
return self.profiles.c.private_key == None # noqa: E711
|
||||
|
||||
@property
|
||||
def profile_is_following(self):
|
||||
return self.profiles.c.following == True # noqa: E711
|
||||
|
|
@ -701,7 +697,7 @@ class SqueakDb:
|
|||
)
|
||||
)
|
||||
.where(self.squeak_is_older_than_retention(interval_s))
|
||||
.where(self.profile_has_no_private_key)
|
||||
.where(not_(self.profile_has_private_key))
|
||||
.where(self.squeak_is_not_liked)
|
||||
)
|
||||
with self.get_connection() as connection:
|
||||
|
|
@ -744,7 +740,7 @@ class SqueakDb:
|
|||
|
||||
def get_contact_profiles(self) -> List[SqueakProfile]:
|
||||
""" Get all contact profiles. """
|
||||
s = select([self.profiles]).where(self.profile_has_no_private_key)
|
||||
s = select([self.profiles]).where(not_(self.profile_has_private_key))
|
||||
with self.get_connection() as connection:
|
||||
result = connection.execute(s)
|
||||
rows = result.fetchall()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue