From eae096fafed0efd0fd3d392c772aac9f3a5a731c Mon Sep 17 00:00:00 2001
From: Mark Huang <mlhuang@cs.princeton.edu>
Date: Thu, 7 Sep 2006 23:47:55 +0000
Subject: [PATCH] - fix accidental modification of class variable

---
 PLC/Methods/AdmGetNodes.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/PLC/Methods/AdmGetNodes.py b/PLC/Methods/AdmGetNodes.py
index c38b8d46..e7ca17fa 100644
--- a/PLC/Methods/AdmGetNodes.py
+++ b/PLC/Methods/AdmGetNodes.py
@@ -44,15 +44,17 @@ class AdmGetNodes(Method):
         # Authenticated function
         assert self.caller is not None
 
+        valid_fields = dict(self.return_fields)
+
         # Remove admin only fields
         if 'admin' not in self.caller['roles']:
             for key in ['boot_nonce', 'key', 'session', 'root_person_ids']:
-                del self.return_fields[key]
+                del valid_fields[key]
 
         # Make sure that only valid fields are specified
         if return_fields is None:
-            return_fields = self.return_fields
-        elif filter(lambda field: field not in self.return_fields, return_fields):
+            return_fields = valid_fields
+        elif filter(lambda field: field not in valid_fields, return_fields):
             raise PLCInvalidArgument, "Invalid return field specified"
 
         # Get node information
-- 
2.47.0