We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
revenue model is '' for everyone
cf. #3479


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `gratipay/models/team.py`
Content:
```
1 """Teams on Gratipay are plural participants with members.
2 """
3 from postgres.orm import Model
4 
5 
6 class Team(Model):
7     """Represent a Gratipay team.
8     """
9 
10     typname = 'teams'
11 
12     def __eq__(self, other):
13         if not isinstance(other, Team):
14             return False
15         return self.id == other.id
16 
17     def __ne__(self, other):
18         if not isinstance(other, Team):
19             return True
20         return self.id != other.id
21 
22 
23     # Constructors
24     # ============
25 
26     @classmethod
27     def from_id(cls, id):
28         """Return an existing team based on id.
29         """
30         return cls._from_thing("id", id)
31 
32     @classmethod
33     def from_slug(cls, slug):
34         """Return an existing team based on slug.
35         """
36         return cls._from_thing("slug_lower", slug.lower())
37 
38     @classmethod
39     def _from_thing(cls, thing, value):
40         assert thing in ("id", "slug_lower")
41         return cls.db.one("""
42 
43             SELECT teams.*::teams
44               FROM teams
45              WHERE {}=%s
46 
47         """.format(thing), (value,))
48 
49     @classmethod
50     def create_new(cls, owner, fields):
51         return cls.db.one("""
52 
53             INSERT INTO teams
54                         (slug, slug_lower, name, homepage, product_or_service,
55                          getting_involved, getting_paid, owner)
56                  VALUES (%s, %s, %s, %s, %s, %s, %s, %s)
57               RETURNING teams.*::teams
58 
59         """, (fields['slug'], fields['slug'].lower(), fields['name'], fields['homepage'],
60               fields['product_or_service'], fields['getting_involved'], fields['getting_paid'],
61               owner.username))
62 
63     def get_og_title(self):
64         out = self.name
65         receiving = self.receiving
66         if receiving > 0:
67             out += " receives $%.2f/wk" % receiving
68         else:
69             out += " is"
70         return out + " on Gratipay"
71 
72 
73     def update_receiving(self, cursor=None):
74         # Stubbed out for now. Migrate this over from Participant.
75         pass
76 
77 
78     @property
79     def status(self):
80         return { None: 'unreviewed'
81                , False: 'rejected'
82                , True: 'approved'
83                 }[self.is_approved]
84
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/gratipay/models/team.py b/gratipay/models/team.py
--- a/gratipay/models/team.py
+++ b/gratipay/models/team.py
@@ -47,18 +47,22 @@
         """.format(thing), (value,))
 
     @classmethod
-    def create_new(cls, owner, fields):
+    def insert(cls, owner, **fields):
+        fields['slug_lower'] = fields['slug'].lower()
+        fields['owner'] = owner.username
         return cls.db.one("""
 
             INSERT INTO teams
-                        (slug, slug_lower, name, homepage, product_or_service,
-                         getting_involved, getting_paid, owner)
-                 VALUES (%s, %s, %s, %s, %s, %s, %s, %s)
+                        (slug, slug_lower, name, homepage,
+                         product_or_service, revenue_model, getting_involved, getting_paid,
+                         owner)
+                 VALUES (%(slug)s, %(slug_lower)s, %(name)s, %(homepage)s,
+                         %(product_or_service)s, %(revenue_model)s, %(getting_involved)s,
+                            %(getting_paid)s,
+                         %(owner)s)
               RETURNING teams.*::teams
 
-        """, (fields['slug'], fields['slug'].lower(), fields['name'], fields['homepage'],
-              fields['product_or_service'], fields['getting_involved'], fields['getting_paid'],
-              owner.username))
+        """, fields)
 
     def get_og_title(self):
         out = self.name

{"golden_diff": "diff --git a/gratipay/models/team.py b/gratipay/models/team.py\n--- a/gratipay/models/team.py\n+++ b/gratipay/models/team.py\n@@ -47,18 +47,22 @@\n         \"\"\".format(thing), (value,))\n \n     @classmethod\n-    def create_new(cls, owner, fields):\n+    def insert(cls, owner, **fields):\n+        fields['slug_lower'] = fields['slug'].lower()\n+        fields['owner'] = owner.username\n         return cls.db.one(\"\"\"\n \n             INSERT INTO teams\n-                        (slug, slug_lower, name, homepage, product_or_service,\n-                         getting_involved, getting_paid, owner)\n-                 VALUES (%s, %s, %s, %s, %s, %s, %s, %s)\n+                        (slug, slug_lower, name, homepage,\n+                         product_or_service, revenue_model, getting_involved, getting_paid,\n+                         owner)\n+                 VALUES (%(slug)s, %(slug_lower)s, %(name)s, %(homepage)s,\n+                         %(product_or_service)s, %(revenue_model)s, %(getting_involved)s,\n+                            %(getting_paid)s,\n+                         %(owner)s)\n               RETURNING teams.*::teams\n \n-        \"\"\", (fields['slug'], fields['slug'].lower(), fields['name'], fields['homepage'],\n-              fields['product_or_service'], fields['getting_involved'], fields['getting_paid'],\n-              owner.username))\n+        \"\"\", fields)\n \n     def get_og_title(self):\n         out = self.name\n", "issue": "revenue model is '' for everyone\ncf. #3479\n\n", "before_files": [{"content": "\"\"\"Teams on Gratipay are plural participants with members.\n\"\"\"\nfrom postgres.orm import Model\n\n\nclass Team(Model):\n    \"\"\"Represent a Gratipay team.\n    \"\"\"\n\n    typname = 'teams'\n\n    def __eq__(self, other):\n        if not isinstance(other, Team):\n            return False\n        return self.id == other.id\n\n    def __ne__(self, other):\n        if not isinstance(other, Team):\n            return True\n        return self.id != other.id\n\n\n    # Constructors\n    # ============\n\n    @classmethod\n    def from_id(cls, id):\n        \"\"\"Return an existing team based on id.\n        \"\"\"\n        return cls._from_thing(\"id\", id)\n\n    @classmethod\n    def from_slug(cls, slug):\n        \"\"\"Return an existing team based on slug.\n        \"\"\"\n        return cls._from_thing(\"slug_lower\", slug.lower())\n\n    @classmethod\n    def _from_thing(cls, thing, value):\n        assert thing in (\"id\", \"slug_lower\")\n        return cls.db.one(\"\"\"\n\n            SELECT teams.*::teams\n              FROM teams\n             WHERE {}=%s\n\n        \"\"\".format(thing), (value,))\n\n    @classmethod\n    def create_new(cls, owner, fields):\n        return cls.db.one(\"\"\"\n\n            INSERT INTO teams\n                        (slug, slug_lower, name, homepage, product_or_service,\n                         getting_involved, getting_paid, owner)\n                 VALUES (%s, %s, %s, %s, %s, %s, %s, %s)\n              RETURNING teams.*::teams\n\n        \"\"\", (fields['slug'], fields['slug'].lower(), fields['name'], fields['homepage'],\n              fields['product_or_service'], fields['getting_involved'], fields['getting_paid'],\n              owner.username))\n\n    def get_og_title(self):\n        out = self.name\n        receiving = self.receiving\n        if receiving > 0:\n            out += \" receives $%.2f/wk\" % receiving\n        else:\n            out += \" is\"\n        return out + \" on Gratipay\"\n\n\n    def update_receiving(self, cursor=None):\n        # Stubbed out for now. Migrate this over from Participant.\n        pass\n\n\n    @property\n    def status(self):\n        return { None: 'unreviewed'\n               , False: 'rejected'\n               , True: 'approved'\n                }[self.is_approved]\n", "path": "gratipay/models/team.py"}], "after_files": [{"content": "\"\"\"Teams on Gratipay are plural participants with members.\n\"\"\"\nfrom postgres.orm import Model\n\n\nclass Team(Model):\n    \"\"\"Represent a Gratipay team.\n    \"\"\"\n\n    typname = 'teams'\n\n    def __eq__(self, other):\n        if not isinstance(other, Team):\n            return False\n        return self.id == other.id\n\n    def __ne__(self, other):\n        if not isinstance(other, Team):\n            return True\n        return self.id != other.id\n\n\n    # Constructors\n    # ============\n\n    @classmethod\n    def from_id(cls, id):\n        \"\"\"Return an existing team based on id.\n        \"\"\"\n        return cls._from_thing(\"id\", id)\n\n    @classmethod\n    def from_slug(cls, slug):\n        \"\"\"Return an existing team based on slug.\n        \"\"\"\n        return cls._from_thing(\"slug_lower\", slug.lower())\n\n    @classmethod\n    def _from_thing(cls, thing, value):\n        assert thing in (\"id\", \"slug_lower\")\n        return cls.db.one(\"\"\"\n\n            SELECT teams.*::teams\n              FROM teams\n             WHERE {}=%s\n\n        \"\"\".format(thing), (value,))\n\n    @classmethod\n    def insert(cls, owner, **fields):\n        fields['slug_lower'] = fields['slug'].lower()\n        fields['owner'] = owner.username\n        return cls.db.one(\"\"\"\n\n            INSERT INTO teams\n                        (slug, slug_lower, name, homepage,\n                         product_or_service, revenue_model, getting_involved, getting_paid,\n                         owner)\n                 VALUES (%(slug)s, %(slug_lower)s, %(name)s, %(homepage)s,\n                         %(product_or_service)s, %(revenue_model)s, %(getting_involved)s,\n                            %(getting_paid)s,\n                         %(owner)s)\n              RETURNING teams.*::teams\n\n        \"\"\", fields)\n\n    def get_og_title(self):\n        out = self.name\n        receiving = self.receiving\n        if receiving > 0:\n            out += \" receives $%.2f/wk\" % receiving\n        else:\n            out += \" is\"\n        return out + \" on Gratipay\"\n\n\n    def update_receiving(self, cursor=None):\n        # Stubbed out for now. Migrate this over from Participant.\n        pass\n\n\n    @property\n    def status(self):\n        return { None: 'unreviewed'\n               , False: 'rejected'\n               , True: 'approved'\n                }[self.is_approved]\n", "path": "gratipay/models/team.py"}]}