[python-fmn-web] Patch two bugs caught in staging.

Ralph Bean ralph at fedoraproject.org
Tue Sep 16 16:31:36 UTC 2014


commit 1120e20ab0ab28c30e85ac6bf7b025ce9af11ce9
Author: Ralph Bean <rbean at redhat.com>
Date:   Tue Sep 16 12:31:31 2014 -0400

    Patch two bugs caught in staging.

 0001-Add-accidentally-omitted-attrs.patch          |   25 ++++++++++++++++++++
 ...is-conditional.-It-was-not-working-at-all.patch |   25 ++++++++++++++++++++
 python-fmn-web.spec                                |    9 ++++++-
 3 files changed, 58 insertions(+), 1 deletions(-)
---
diff --git a/0001-Add-accidentally-omitted-attrs.patch b/0001-Add-accidentally-omitted-attrs.patch
new file mode 100644
index 0000000..33ed6c7
--- /dev/null
+++ b/0001-Add-accidentally-omitted-attrs.patch
@@ -0,0 +1,25 @@
+From c1dbaac79dd6b6acb523f0f612957b472bec9d57 Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Tue, 16 Sep 2014 11:54:33 -0400
+Subject: [PATCH 1/2] Add accidentally omitted attrs.
+
+---
+ fmn/web/templates/context.html | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fmn/web/templates/context.html b/fmn/web/templates/context.html
+index 8020c5e..9544679 100644
+--- a/fmn/web/templates/context.html
++++ b/fmn/web/templates/context.html
+@@ -105,7 +105,7 @@
+               <span class="glyphicon glyphicon-ok"></span>
+               Enable this filter</button>
+             {% endif %}
+-            <button type="submit" class="btn btn-danger">
++            <button type="submit" name="method" value="delete" class="btn btn-danger">
+               <span class="glyphicon glyphicon-remove"></span>
+               Delete this filter</button>
+           </span>
+-- 
+1.9.3
+
diff --git a/0002-Fix-this-conditional.-It-was-not-working-at-all.patch b/0002-Fix-this-conditional.-It-was-not-working-at-all.patch
new file mode 100644
index 0000000..e398b95
--- /dev/null
+++ b/0002-Fix-this-conditional.-It-was-not-working-at-all.patch
@@ -0,0 +1,25 @@
+From ad3d70d6b9d4ba60732853dba6ac14818dcbb4b2 Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Tue, 16 Sep 2014 12:28:44 -0400
+Subject: [PATCH 2/2] Fix this conditional.  It was not working at all.
+
+---
+ fmn/web/app.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fmn/web/app.py b/fmn/web/app.py
+index fa4f097..f154cc7 100644
+--- a/fmn/web/app.py
++++ b/fmn/web/app.py
+@@ -689,7 +689,7 @@ def handle_details():
+     # Are they deleting a delivery detail?
+     if delete_value:
+         # Primarily, delete the value from this user
+-        if detail_value in pref.detail_values:
++        if delete_value in [value.value for value in pref.detail_values]:
+             pref.delete_details(SESSION, delete_value)
+ 
+         # Also, if they have a confirmation hanging around, delete that too.
+-- 
+1.9.3
+
diff --git a/python-fmn-web.spec b/python-fmn-web.spec
index 2866125..98fb1d2 100644
--- a/python-fmn-web.spec
+++ b/python-fmn-web.spec
@@ -8,13 +8,15 @@
 
 Name:               python-fmn-web
 Version:            0.3.0
-Release:            1%{?dist}
+Release:            2%{?dist}
 Summary:            Frontend Web Application for Fedora Notifications
 
 Group:              Development/Libraries
 License:            LGPLv2+
 URL:                http://pypi.python.org/pypi/fmn.web
 Source0:            http://pypi.python.org/packages/source/f/%{modname}/%{modname}-%{version}.tar.gz
+Patch0:            0001-Add-accidentally-omitted-attrs.patch
+Patch1:            0002-Fix-this-conditional.-It-was-not-working-at-all.patch
 
 BuildArch:          noarch
 
@@ -81,6 +83,8 @@ This module contains the frontend web application for Fedora Notifications.
 
 %prep
 %setup -q -n %{modname}-%{version}
+%patch0 -p1
+%patch1 -p1
 
 # Remove bundled egg-info in case it exists
 rm -rf %{modname}.egg-info
@@ -107,6 +111,9 @@ cp -r fmn/web/static/ %{buildroot}%{_datadir}/%{modname}/static
 %{_datadir}/%{modname}
 
 %changelog
+* Tue Sep 16 2014 Ralph Bean <rbean at redhat.com> - 0.3.0-2
+- Patch two bugs caught in staging.
+
 * Mon Sep 15 2014 Ralph Bean <rbean at redhat.com> - 0.3.0-1
 - Latest upstream.
 


More information about the scm-commits mailing list