Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
beem
Commits
97c3f333
Commit
97c3f333
authored
4 years ago
by
Holger
Browse files
Options
Downloads
Patches
Plain Diff
Fix detection when a vote does not exists on HF24
parent
63a863ec
No related branches found
No related tags found
2 merge requests
!5
Taken current version of master branch in the https://github.com/holgern/beem
,
!4
Original changes pushed to master at https://github.com/holgern/beem
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.rst
+2
-1
2 additions, 1 deletion
CHANGELOG.rst
beem/vote.py
+11
-1
11 additions, 1 deletion
beem/vote.py
with
13 additions
and
2 deletions
CHANGELOG.rst
+
2
−
1
View file @
97c3f333
...
...
@@ -11,7 +11,8 @@ Changelog
* Fix compatibility issues with HF 24
* account get_follow_count, get_followers and get_following have been fixed
* improved get_discussions calls, fallback to condenser when tags api not available
* Fix detection when content does not exists
* Fix detection when content does not exists on HF24
* Fix detection when a vote does not exists on HF24
0.24.9
------
...
...
This diff is collapsed.
Click to expand it.
beem/vote.py
+
11
−
1
View file @
97c3f333
...
...
@@ -102,7 +102,11 @@ class Vote(BlockchainObject):
try
:
votes
=
self
.
blockchain
.
rpc
.
get_active_votes
({
'
author
'
:
author
,
'
permlink
'
:
permlink
},
api
=
"
tags
"
)[
'
votes
'
]
except
:
votes
=
self
.
blockchain
.
rpc
.
get_active_votes
(
author
,
permlink
,
api
=
"
database_api
"
)
from
beemapi.exceptions
import
InvalidParameters
try
:
votes
=
self
.
blockchain
.
rpc
.
get_active_votes
(
author
,
permlink
,
api
=
"
database_api
"
)
except
InvalidParameters
:
raise
VoteDoesNotExistsException
(
self
.
identifier
)
else
:
votes
=
self
.
blockchain
.
rpc
.
get_active_votes
(
author
,
permlink
,
api
=
"
database_api
"
)
except
UnkownKey
:
...
...
@@ -378,8 +382,11 @@ class ActiveVotes(VotesObject):
# votes = authorperm["active_votes"]
if
self
.
blockchain
.
rpc
.
get_use_appbase
():
self
.
blockchain
.
rpc
.
set_next_node_on_empty_reply
(
False
)
from
beemapi.exceptions
import
InvalidParameters
try
:
votes
=
self
.
blockchain
.
rpc
.
get_active_votes
(
authorperm
[
"
author
"
],
authorperm
[
"
permlink
"
],
api
=
"
condenser
"
)
except
InvalidParameters
:
raise
VoteDoesNotExistsException
(
construct_authorperm
(
authorperm
[
"
author
"
],
authorperm
[
"
permlink
"
]))
except
:
votes
=
self
.
blockchain
.
rpc
.
get_active_votes
({
'
author
'
:
authorperm
[
"
author
"
],
'
permlink
'
:
authorperm
[
"
permlink
"
]},
...
...
@@ -391,8 +398,11 @@ class ActiveVotes(VotesObject):
[
author
,
permlink
]
=
resolve_authorperm
(
authorperm
)
if
self
.
blockchain
.
rpc
.
get_use_appbase
():
self
.
blockchain
.
rpc
.
set_next_node_on_empty_reply
(
False
)
from
beemapi.exceptions
import
InvalidParameters
try
:
votes
=
self
.
blockchain
.
rpc
.
get_active_votes
(
author
,
permlink
,
api
=
"
condenser
"
)
except
InvalidParameters
:
raise
VoteDoesNotExistsException
(
construct_authorperm
(
author
,
permlink
))
except
:
votes
=
self
.
blockchain
.
rpc
.
get_active_votes
({
'
author
'
:
author
,
'
permlink
'
:
permlink
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment