emre / dpoll.xyz

Decentralized poll app on the top HIVE blockchain
MIT License
22 stars 9 forks source link

Doubled tags on Steem root posts #92

Open espoem opened 5 years ago

espoem commented 5 years ago

Actual behaviour

Dpoll tags are doubled at a Steem post of the poll.

image

image

Test post: https://steempeak.com/dpoll/@elear/which-perks-would-you-like-to-have-the-most-on-an-upcoming-crowdfunding-campaign-for-utopian

(tags are not doubled on steemit interface)

Expected behaviour

Each tag should be present at most once.

emre commented 5 years ago

This might be related to editing. Will investigate.

kekkyojin commented 5 years ago

I think so. In https://github.com/emre/dpoll.xyz/blob/d7d758f2908948b0ba4123f35036f3b2834a506c/dpoll/polls/views.py#L240 edit_poll method, code is not checking for the tags parameter to contain the settings.DEFAULT_TAGS and it is just concatenating them:

    if tags:
        tags = settings.DEFAULT_TAGS + tags
    else:
        tags = settings.DEFAULT_TAGS