liquid_feedback_core

changeset 15:6f6ec6b5eee9 beta16

Version beta16

Critical bug related to revoked initiatives fixed, which caused lf_update or check_everything() to exit with an error instead of performing the neccessary tasks
author jbe
date Wed Jan 13 12:00:00 2010 +0100 (2010-01-13)
parents ac7836ac00d9
children 359d2b311f2c
files core.sql
line diff
     1.1 --- a/core.sql	Sun Jan 10 12:00:00 2010 +0100
     1.2 +++ b/core.sql	Wed Jan 13 12:00:00 2010 +0100
     1.3 @@ -6,7 +6,7 @@
     1.4  BEGIN;
     1.5  
     1.6  CREATE VIEW "liquid_feedback_version" AS
     1.7 -  SELECT * FROM (VALUES ('beta15', NULL, NULL, NULL))
     1.8 +  SELECT * FROM (VALUES ('beta16', NULL, NULL, NULL))
     1.9    AS "subquery"("string", "major", "minor", "revision");
    1.10  
    1.11  
    1.12 @@ -2152,10 +2152,10 @@
    1.13          "fully_frozen" = now()
    1.14          WHERE "id" = "issue_id_p";
    1.15        FOR "initiative_row" IN
    1.16 -        SELECT * FROM "initiative" WHERE "issue_id" = "issue_id_p"
    1.17 +        SELECT * FROM "initiative"
    1.18 +        WHERE "issue_id" = "issue_id_p" AND "revoked" ISNULL
    1.19        LOOP
    1.20          IF
    1.21 -          "initiative_row"."revoked" ISNULL AND
    1.22            "initiative_row"."satisfied_supporter_count" > 0 AND
    1.23            "initiative_row"."satisfied_supporter_count" *
    1.24            "policy_row"."initiative_quorum_den" >=
    1.25 @@ -2408,7 +2408,7 @@
    1.26                ON "vote"."initiative_id" = "initiative"."id"
    1.27                AND "vote"."member_id" = "direct_voter"."member_id"
    1.28              WHERE "initiative"."issue_id" = "issue_id_p"
    1.29 -            AND "initiative"."admitted"
    1.30 +            AND "initiative"."admitted"  -- NOTE: NULL case is handled too
    1.31              GROUP BY "initiative"."id"
    1.32            ) AS "vote_counts",
    1.33            "issue",

Impressum / About Us