                   (assoc with-status-props :board-uuid new-board-uuid)
                   (dissoc with-status-props :board-uuid))
           merged-entry (merge existing-entry (entry-res/ignore-props props))
-          updated-entry (update merged-entry :attachments #(entry-res/timestamp-attachments %))
+          with-attachments (update merged-entry :attachments #(entry-res/timestamp-attachments %))
+          updated-entry (clean-polls-for-patch existing-entry with-attachments)
           ts (db-common/current-timestamp)]
       (if (lib-schema/valid? common-res/Entry updated-entry)
         {:existing-entry (api-common/rep existing-entry)

        [false, {:reason (.getMessage e)}])) ; Not a valid new entry
    [false, {:reason "Invalid board."}])) ; couldn't find the specified board

(defn- valid-entry-update? [conn entry-uuid entry-props user entry-publish?]
  (if-let [existing-entry (entry-res/get-entry conn entry-uuid)]
    ;; Merge the existing entry with the new updates

  (let [user-has-voted? (some #(when (= % (:user-id user)) %) (:replies poll))
        
        updated-poll-replies (mapv (partial update-reply (:user-id user) reply-id add?) (:replies poll))
        sorted-replies (reverse (sort-by (juxt :votes-count :created-at) updated-poll-replies))
        updated-poll (merge poll {:replies sorted-replies :total-votes-count (reduce + (map :votes-count sorted-replies))})
        filtered-polls (filterv #(not= (:poll-uuid %) (:poll-uuid poll)) (:polls entry))
        final-entry (assoc entry :polls (vec (conj filtered-polls updated-poll)))
