Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug 🐛]: 🪪 Orderable id #63

Closed
mrharpo opened this issue Sep 29, 2022 · 3 comments · Fixed by #64
Closed

[Bug 🐛]: 🪪 Orderable id #63

mrharpo opened this issue Sep 29, 2022 · 3 comments · Fixed by #64
Assignees
Labels
bug 🐛 Something isn't working maintenance 🔧 Updates and upgrades

Comments

@mrharpo
Copy link
Contributor

mrharpo commented Sep 29, 2022

What happened?

The AuthorOrderable is returning the id of each author in the Orderable, instead of the id of the Author.

Same applies for the ExhibitOrderable

Expected results

Expected id to represent the Author.id

Steps to reproduce

  1. Get /api/v2/exhibit/
  2. See authors[0].id is different everywhere.
  3. They should all be 1

Relevant logs

{
    "id": 6,
    "meta": {
        "type": "exhibit.ExhibitPage",
        "detail_url": "http://localhost:3000/api/v2/pages/6/"
    },
    "title": "Children as Cultural Producers",
    "body": "<p data-block-key=\"k6vw9\">Every episode of <i>ZOOM</i> drew upon the talents and ideas of two groups of children: ZOOMers, who performed in cohorts of seven to ten children per season and took part in the creation and editing of some <i>ZOOM</i> content, and the series’ youthful fans, who mailed in their suggestions, original content, and feedback. These two groups were always in dialogue with one another. Even as ZOOMers offered to teach viewers to “<a href=\"https://americanarchive.org/catalog/cpb-aacip-15-3331znzg?start=104.52&amp;end=190.65\">fly high</a>,” their young audience provided most of the show’s content; even as viewers learned from <i>ZOOM</i>ers, they were inspired to share their own materials.</p><p data-block-key=\"38pqd\"><i>ZOOM</i>’s adult producers represented the series as authentically child-led. Yet while children generated many of its ideas, the demands of producing a successful weekly television show set important limits on their ability to determine its content, form, and style. With adult producers as overseers and intermediaries, <i>ZOOM</i> was an example of intergenerational cultural production; while its producers sought to advance children’s sense of themselves as empowered agents, the goal of creating a participatory television show for children was at least partly in tension with making the program appealing to its audience. <i>ZOOM</i> was choreographed, organized, and edited by adults; rarely visible in episodes, these members of the production team were powerful partners behind the scenes. Adults, not children, had professional connections and the training to keep the flow lively. All ZOOMers attended regular schools full-time, and none were professional performing artists prior to appearing on the show. Their “ordinariness” made them attractive on-screen; at the same time, relatively few preteens had the skill to carry more of the production load, let alone to do so in an entertaining way.</p><p data-block-key=\"dkqpp\">Consider the fate of a similar show, <i>Take a Giant Step</i> (NBC, 1971-72), which debuted when <i>ZOOM</i> was first in production. The conceit of <i>Take a Giant Step</i> was very similar to that of <i>ZOOM</i>: a mix of entertainment and information in a magazine format, with young teenage hosts on live television discussing issues of interest to a preadolescent audience. Like <i>ZOOM</i>, <i>Take a Giant Step</i> encouraged viewers to interact with the show by mail and floated the idea that some viewers could make their own films for use on the series. Unfortunately, contemporary reviewers found the rotating hosts on <i>Take a Giant Step</i> to be unpolished and awkward; these critics called the show’s concept innovative but found the overall effect uncomfortable and boring.<a href=\"https://americanarchive.org/exhibits/zoom/notes#23\">23</a> <i>ZOOM</i>, on the other hand, appeared to have just the right amount of polish: enough to be well-paced, but not so much as to appear inauthentic.</p><p data-block-key=\"epjsu\">ZOOMers did have a role in shaping the series’ content.<a href=\"https://americanarchive.org/exhibits/zoom/notes#24\">24</a> At least some of the time, staff offered ZOOMers a choice of plays and poems submitted by viewers, and asked which materials the ZOOMers preferred to use.<a href=\"https://americanarchive.org/exhibits/zoom/notes#25\">25</a> The fairly improvisational rehearsals on the WGBH set reflected this collaborative process between adults and children. As Jon, one of the first season ZOOMers, later recalled, “Initially we had a script to follow. I was supposed to go in to interview this kid who had invented something. I remember not understanding how I was supposed to behave. And they finally figured out that the more they let us play and improv, the better off they were.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#26\">26</a> Especially in season one, much of what became classic ZOOM material was based on improvisation. For example, one day, after ZOOMer Tracy was injured on set, Sarson gathered the other children to discuss their feelings about going to the hospital; this filmed conversation became the <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-3331znzg?start=1184.62&amp;end=1416.66\">first ZOOMrap</a>, a signature of the show.<a href=\"https://americanarchive.org/exhibits/zoom/notes#27\">27</a> ZOOMers also wrote some material themselves. In season one, Nina sang a <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-547pvzxn?start=1310.88&amp;end=1452.64\">song</a> she had written about a short-lived romantic relationship; in season four, the ZOOMers collectively scripted and helped to build the sets for the first episode of a parodic soap opera, “<a href=\"https://americanarchive.org/catalog/cpb-aacip-15-27mpgfq1?start=266.68&amp;end=691.78\">As the World ZOOMs</a>”; in season five, ZOOMer Jennifer read a <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-16c2g0jn?start=926.14&amp;end=956.95\">poem</a> she had written about becoming a teenager.<a href=\"https://americanarchive.org/exhibits/zoom/notes#28\">28</a></p><p data-block-key=\"5natk\">A creative ethos was a hallmark of the series. Numerous former ZOOMers later recalled that their auditions seemed designed to assess their inventiveness. When Cate auditioned for season four, the members of her audition group were asked to read an imaginary letter plucked from an imaginary treasure chest; she later reflected that she had done well to add a detail—a padlock on the chest—to her performance.<a href=\"https://americanarchive.org/exhibits/zoom/notes#29\">29</a> Such skills served ZOOMers well on set. For example, one newspaper reporter who watched <i>ZOOM</i> rehearsals saw ZOOMers Jay and Kenny rolling the <i>ZOOM</i> barrel from one end of the television studio to the other, with ZOOMer David scrunched up inside. “Watch this, Billy!” David called out to Billy Wilson, the show’s first choreographer. Wilson replied, “We’ll use it!”<a href=\"https://americanarchive.org/exhibits/zoom/notes#30\">30</a> On another occasion, the ZOOMers gathered to discuss “Where’s the Report Card?” a play submitted by a fifteen-year-old boy from Maryland. Sarson led the children through the script, allowing them to digress and to suggest their own riddles and jokes, all the while guiding them until they had refined the dialogue and action to their collective satisfaction. A visiting newspaper reporter described the scene as “utter chaos.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#31\">31</a></p><p data-block-key=\"88oqc\">To consider <i>ZOOM</i> as an example of intergenerational collaboration is not to diminish the role of children as cultural creators. Ultimately, the roles of children and adults in creating <i>ZOOM</i> were complementary. <i>ZOOM</i>’s adult leadership acknowledged children’s capabilities and ideas by encouraging viewer participation and deliberately involving the young cast members in some degree of decision-making. Young viewers’ enthusiastic participation in the <i>ZOOM</i> community attested to their own sense that they were important partners in the enterprise.</p><p data-block-key=\"7fb8l\"><i>Letter to ZOOM about sending letters to ZOOM.</i></p><p data-block-key=\"dqs4e\">Toward the goal of an entertaining and thoughtful final product, <i>ZOOM</i>’s adult staff served as gatekeepers, determining which of the ideas submitted by children would appear on each episode (or be discussed for inclusion) and deciding in general terms how to present the material. Staff rewrote some letters for clarity and edited most for brevity before ZOOMers read them on the air. For example, one girl from Texas sent ZOOM a play she had written that featured what she called a “hippie” character; <i>ZOOM</i> staff substituted a “panhandler” and converted her slangy line, “Ain’t no place to go,” into standard English.<a href=\"https://americanarchive.org/exhibits/zoom/notes#32\">32</a> Where producers could not find examples of the kind of material they wanted, they sought out other ways to get it. For example, in the first season, the producers felt that most short films created by children were not of high enough visual and sound quality to use on air, so they turned to a Boston-area art studio where children were taking courses in <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-3331znzg?start=504.27&amp;end=635.68\">film animation</a>. (By season six, “<a href=\"https://americanarchive.org/catalog/cpb-aacip-15-4302vj7k?start=675.64&amp;end=728.5\">Cinema</a> <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-623bkh5c?start=1081.45&amp;end=1197.11\"><i>ZOOM</i></a>” was a regular feature, a sign that more American children now had access to film equipment with which they could create short films.) Even as thousands of eager children wrote to <i>ZOOM</i> listing their talents and asking to be ZOOMguests, the producers appear to have found most ZOOMguests through their own contacts. <i>ZOOM</i> staff also deliberately selected material to showcase the diversity and range of their audience, whether by choosing letters representative of different regions or by filming ZOOMguest documentaries across the country. Almost every episode ended with an upbeat song and dance number; these too were chosen, choreographed, and filmed by adults.</p><p data-block-key=\"bhgp6\"><i>ZOOM</i> staff deliberately removed and elided these signs of adult influence from the finished episodes. ZOOMguest documentaries, for example, appeared to be narrated by the children whose voice-overs they featured, but these voice-overs were spliced from children’s responses to taped interviews led by adult interviewers; the adult voices were then edited out. Similarly, ZOOMraps appeared to be self-directed conversations among children. In point of fact, adults asked cast members questions off-camera, and in the subsequent editing process these adult voices were removed and the conversations were condensed. Occasionally, viewers were invited to see the production crew in action “behind the scenes,” for example as ZOOMers were <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-71ngfff7?start=647.61&amp;end=903.4\">learning</a> and <a href=\"https://americanarchive.org/catalog/cpb-aacip_15-150gbf7x?start=344.01&amp;end=603.02\">rehearsing</a> lyrics to songs that they would later perform. In the final episode of season six, as the series came to a close, <i>ZOOM</i> producers interspersed scenes of the crew with more traditional scenes of ZOOMers performing the <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-40ksnb39?start=1491.66&amp;end=1660.24\">weekly song-and-dance sequence</a>. As the credits rolled, the final scene offered a broader view of the studio in which the cast and crew were visible only in silhouette, beyond the cranes of another camera operator and a boom operator. As this “zooming out” made clear, many adults were in fact just out of camera range. But over the course of its run, most young fans of <i>ZOOM</i> likely didn’t know or care about the show’s degree of adult mediation; they found it satisfyingly child-focused, entertaining, and well-paced.</p><p data-block-key=\"efdqr\">To deal with the deluge of mail the series received, <i>ZOOM</i> staff and adult volunteers sorted incoming letters into categories before the production staff considered them: <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-00ns1zsw?start=1464.27&amp;end=1713.51\">plays</a>, <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-70zpcpsf?start=711.59&amp;end=979.13\">stories</a>, <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-0644j8kn?start=1196.62&amp;end=1225.97\">poems</a>, requests to appear on ZOOM, <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-354f5187?start=147.89&amp;end=204.96\">games</a>, <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-848pkg5b?start=1048.21&amp;end=1224.05\">ZOOMdos</a>, <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-17crjpmm?start=373.16&amp;end=398.94\">jokes and riddles</a>, and other ideas. In one five-day period in January 1975, volunteers processed over 11,000 letters.<a href=\"https://americanarchive.org/exhibits/zoom/notes#33\">33</a> About one third of these letters included SASEs, many with requests for photos of cast members or for ZOOMcards explaining more complex ZOOMdos, such as making <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-83xsjkh9?start=607.06&amp;end=830.39\">puppets</a> or constructing <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-3331znzg?start=642.07&amp;end=985.84\">a raft</a> out of sticks and branches. Many children sent in story and game ideas or made <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-27mpgfjk?start=380.95&amp;end=547.06\">suggestions</a> for ZOOMraps based on their own problems or concerns. One child from Arkansas, for example, asked that ZOOMers do a rap about “how would you feel if you had a gerbil, and your dad didn’t like him. I have to move away in July and I don’t want to leave him.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#34\">34</a> Some viewers sent in contributions such as ZOOM-themed art, and general suggestions or requests for personal advice. A third of the 1975 sample were simply affirmations, on the order of “I like ZOOM.”</p><p data-block-key=\"3r51o\"><i>Letter to ZOOM about wanting to be on the show, from a viewer in Brookline, Massachusetts..</i> <i>Letter from a viewer in Brookyln, New York requesting a ZOOM card on how to make a raft.</i> <i>Letter from a viewer in Greenville, Mississippi about her relationship with her sister.</i> <i>Letter from a viewer in Albuquerque, New Mexico about getting into fights with friends.</i> <i>Letter from a viewer in Buffalo, New York about not being treated fairly.</i> <i>Letter from a viewer in Westminster, Massachusetts about sibling problems.</i> <i>Letter from a viewer in Cape Cod, Massachusetts about how much they enjoy ZOOM.</i> <i>Letter from a viewer in Bourne, Massachusetts about how much they enjoy ZOOM.</i> <i>Letter from a viewer in La Grange, Georgia about how much they enjoy ZOOM.</i></p><p data-block-key=\"2ljgl\">These letter-writers represented a wider age cohort than the seven-to-twelve-year-olds who were <i>ZOOM</i>’s target audience. Some children were so young that they dictated their letters to their parents. Some teenagers, especially those who had grown up with <i>ZOOM</i>, also continued to watch the show and to write in, though a few of them wrote specifically to ask whether they might now be too old to keep watching. One seventeen-year-old high school junior from Iowa enthused that “I really enjoy <i>ZOOM</i>! A lot of my friends watch <i>ZOOM</i> also!”<a href=\"https://americanarchive.org/exhibits/zoom/notes#35\">35</a></p><p data-block-key=\"d7fnl\">A number of the show’s most fervent fans wrote repeatedly to <i>ZOOM</i>. In the late 1970s, a thirteen-year-old girl from Nebraska who had been watching the show for five years estimated that “This is about the 10 letter [<i>sic</i>] I’ve written to you and I must say I am impressed. Every time I write you always send an answer and it usually comes in about a week.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#36\">36</a> Other young fans sent letters decorated with handmade stamps in lieu of actual postage; WGBH regularly paid the postage due.<a href=\"https://americanarchive.org/exhibits/zoom/notes#37\">37</a> For viewers who sent in SASEs, ZOOMcards invited them to write again, thereby reinforcing their connection to the series.</p><p data-block-key=\"5vftj\">Part of what inspired so many children to write to <i>ZOOM</i> was the possibility that their ideas or artistic contributions might appear on air, introduced by ZOOMers and publicly credited to them by name and hometown. This recognition was encouraging; one ten-year-old girl from upstate New York whose stunt appeared on <i>ZOOM</i> was then inspired to begin writing a play.<a href=\"https://americanarchive.org/exhibits/zoom/notes#38\">38</a> Children were so eager to participate in <i>ZOOM</i> culture and to be celebrated as creators of <i>ZOOM</i> content that some tried to put pressure on <i>ZOOM</i> to use their material: “I have sent in a lot of things to do. But I have never seen them on your show. I have waited and waited and waited for a long long time,” wrote one Californian.<a href=\"https://americanarchive.org/exhibits/zoom/notes#39\">39</a> Another complained bitterly, “I wroght [<i>sic</i>] before and you [expletive] didn’t have a rap about it.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#40\">40</a> A third noted that despite his having written over one hundred letters over the course of four years (some directly to <i>ZOOM</i>, and others to politicians on <i>ZOOM</i>’s behalf), none of his letters to <i>ZOOM</i> had ever appeared on the air. Even so, he reflected, he had benefitted from the show: “I feel that all forty-two Zoomers and I have become personal friends … ZOOM has made my life so different, by learning about new people, places, and things and participating in them.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#41\">41</a></p><p data-block-key=\"efp5u\">From <i>ZOOM</i>’s premiere onward, children from around the nation also pleaded to join the cast. The pilot episode, broadcast on WGBH several times in early September 1971 to test <i>ZOOM</i>’s appeal, sparked the first of many such requests. As one early viewer wrote, “I am twelve years old. I wondered if by chance you would like or need another person for your cast.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#42\">42</a> Because <i>ZOOM</i> represented the cast members as ordinary Americans doing activities that any child could do, being on <i>ZOOM</i> seemed relatively attainable. One boy from the New York City suburbs wrote in 1977 that he was motivated to ask about becoming a cast member once he “realized that the kids on <i>ZOOM</i> weren’t any kind of fancy child actors but just regular kids.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#43\">43</a> Many fans didn’t realize that ZOOMers all lived in the greater Boston area, and that most viewers were thus ineligible to be cast members. A <i>ZOOM</i> fact sheet created to address many of the most common letter-writers’ queries explained, “Because <i>ZOOM</i> doesn’t want to disrupt a ZOOMer’s private life any more than is absolutely necessary, it is not possible to make special arrangements to live with a friend, commute to Boston or move to Boston just to be on <i>ZOOM</i>.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#44\">44</a> To address its viewers’ curiosity about life as a ZOOMer, the first season included <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-00ns1zsw?start=729.88&amp;end=893.64\">a rap</a> about “What’s it like to be on TV.”</p><p data-block-key=\"88krk\">ZOOMers knew that their experiences of appearing on television were unusual and set them apart. But the message they received from staff was, as season one ZOOMer Ann recalled, “that we were chosen because we were ordinary—they went to great lengths to make sure that we didn’t get our egos all pumped up—but there’s no way on earth you actually believe that.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#45\">45</a> <i>ZOOM</i> emphasized ordinariness in the service of its larger claim: that all children were capable of cultural creation. As Sarson told the press in 1972, “Never underestimate the potential of that kid down the block.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#46\">46</a></p><p data-block-key=\"d350r\">To preserve the notion that the cast members were regular kids, plucked from obscurity, who returned to it once their time on television (a season or two at most) was at an end, ZOOMers were known to viewers only by their first names. They didn’t travel outside of the Boston region on <i>ZOOM</i> business and were specifically prohibited from parlaying their fame on <i>ZOOM</i> into appearances in advertisements or other television shows for several years afterward. As a means of protecting the “ordinary”-ness of its casts, the <i>ZOOM</i> staff did what they could to insulate ZOOMers from viewer attention. ZOOMers were not allowed to read their own fan mail, let alone respond to it. In one exception to this rule, when Sarson wanted second season ZOOMer Bernadette to explain on camera how she did her <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-03qv9zv2?start=138.54&amp;end=492.24\">signature arm wave</a>, he showed her some of the fan mail asking about this special skill.<a href=\"https://americanarchive.org/exhibits/zoom/notes#47\">47</a></p><p data-block-key=\"9ftlh\">The fact that ZOOMers were not professional entertainers made them appear more approachable. When cast members were shown unable to keep a straight face while performing a <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-89d51wbq?start=626.89&amp;end=774.07\">play</a> about a princess locked in a tower, or demonstrating recipes such as a sloppy <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-65v6x9mz?start=987&amp;end=1101.06\">ice cream</a> snowman, they appeared to be accessible, ordinary, and <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-32d7wx36?start=172.13&amp;end=249.11\">unpolished</a>. These qualities were central to their charm, allowing viewers to identify with (rather than merely to idolize) them. Viewers knew little about the cast members’ lives off-camera, but letters to the show suggest that children experienced ZOOMers, in the words of one eight-year-old girl, as “just like my best friend!” nonetheless.<a href=\"https://americanarchive.org/exhibits/zoom/notes#48\">48</a> A sense of intimacy encouraged many viewers to see themselves as part of a collective ZOOM community, and to pick up their pens and pencils and respond.</p><p data-block-key=\"h1nm\">The diversity of ZOOMers also inspired viewer participation. Children who watched the show regularly often felt connected to several seasons’ worth of ZOOMers at once, because many local PBS affiliates began to broadcast reruns from multiple seasons on weekday afternoons, in addition to each week’s new episode. This repetition allowed viewers to compare cast members from various seasons and to choose favorites. While <i>ZOOM</i> gave equal attention to all its cast members, individual viewers identified more with some ZOOMers than with others, and many children wrote specifically to particular ZOOMers or asked for specific cast members’ ZOOMcards. A number of young viewers wrote about having crushes on specific ZOOMers. At a time when children of diverse racial backgrounds were significantly underrepresented in American popular culture, many children of color wrote expressly to ZOOMers of their own race, sometimes adding their own photographs to their letters.</p><p data-block-key=\"4bptl\">In one notable instance, <i>ZOOM</i> asked children to send in letters to defend the series from cancellation. In the 1970s, funding for educational television remained politically unstable. Over the course of its run, <i>ZOOM</i> received funding from CPB, the Ford Foundation, and (in its sixth and final season) the U.S. Office of Education, as well as General Foods Corporation and McDonald’s Corporation, but <i>ZOOM</i>’s executive producers had to lobby to ensure the show’s survival. In February 1973, producers discovered that CPB was not planning to renew <i>ZOOM</i>’s grant. Staff immediately organized what they called a ZOOMalarm for the following week’s episode, adding footage of ZOOMer Maura looking directly at the camera and telling the audience at home: “<i>ZOOM may be taken off the air. The people who decide are in Washington. If you love *ZOOM</i> and want <i>ZOOM</i> to stay on, send us your picture. We will send it to Washington to show you care.” Within a month, <i>ZOOM</i> had received almost 200,000 letters of support.<a href=\"https://americanarchive.org/exhibits/zoom/notes#49\">49</a></p><p data-block-key=\"chijj\">The ZOOMalarm was a savvy use of media campaigning. In the style of ACT and similar liberal lobbying groups, <i>ZOOM</i> was training children to become activists who could advocate for their own interests. “I want to save <i>ZOOM</i>!!!” wrote one girl. “I like <i>ZOOM</i>. Please keep it on the air,” wrote a six-year-old boy.<a href=\"https://americanarchive.org/exhibits/zoom/notes#50\">50</a> The media described the ZOOMalarm as a sign of the democratic process; as <i>Newsweek</i> noted in 1973, “Could anything be more participatory than a children’s program relying on its audience for ideas, on children for its performers, and on public opinion for its very survival?”<a href=\"https://americanarchive.org/exhibits/zoom/notes#51\">51</a> The ensuing press coverage, and the letters generated by children, prompted CPB to reconsider its decision, and <i>ZOOM</i> continued for an additional four seasons.</p><p data-block-key=\"2ni33\">This activist lobbying was only provisionally effective. In 1975-76, <i>ZOOM</i> production was temporarily halted due to funding difficulties, and new episodes were replaced with <i>ZOOM</i> reruns. The series finally came to a close in 1978 after a short sixth season. Some fans, when they heard that <i>ZOOM</i> was ending, wrote in with advice. “Why don’t you have another ZOOM ALARM?” asked one; “Why didn’t you tell viewers to write to company [<i>sic</i>] that would give <i>ZOOM</i> a grant?” suggested another.<a href=\"https://americanarchive.org/exhibits/zoom/notes#52\">52</a> The ZOOMalarm remained a touchstone, having taught many young viewers about the possibilities of their own collective power.</p><p data-block-key=\"703lb\">Even though the majority of children who watched <i>ZOOM</i> never wrote in, only a small number of viewers saw their own ideas on television, and even fewer served as ZOOMers, <i>ZOOM</i> had a broad reach in American children’s culture. Viewers frequently parlayed elements of <i>ZOOM</i> episodes into their own neighborhood play. One parent noted that after an episode in which the cast members played a game of jacks, her daughter insisted on getting jacks; everywhere they looked the stores were sold out of the game because, the mother contended, other <i>ZOOM</i> fans had already bought them.<a href=\"https://americanarchive.org/exhibits/zoom/notes#53\">53</a> In letters to <i>ZOOM</i>, children frequently explained that they tried to speak <a href=\"https://americanarchive.org/catalog/cpb-aacip_15-22v41z71?start=1399.90&amp;end=1702.01\">Ubbi-Dubbi</a>; puzzled over why <a href=\"https://americanarchive.org/catalog/cpb-aacip-15-46qz6c1r?start=382.01&amp;end=412.92\">Fannee Doollee</a> (the subject of a number of early puzzles) liked certain things and hated others; and described making craft projects based on ZOOMdos. One set of friends living in the Boston suburbs “would reenact the shows,” as a viewer later recalled, “and we each got to be our favorite character. Of the girls, we all fought over being Ann.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#54\">54</a> Other children were inspired to try new games or art projects. As one Massachusetts girl explained, “When I watch your show I get a lot of ideas.”<a href=\"https://americanarchive.org/exhibits/zoom/notes#55\">55</a> Whether as fans of the show or as creative advisors, viewers immersed themselves in an inclusive, interactive space of cultural creation.</p>",
    "cover_image": null,
    "cover_thumb": null,
    "hero_image": null,
    "hero_thumb": null,
    "authors": [
        {
            "id": 3,
            "meta": {
                "type": "authors.AuthorsOrderable"
            },
            "name": "Leslie Paris",
            "image": {
                "url": "/media/images/paris.2e16d0ba.fill-100x100.jpg",
                "full_url": "http://localhost:8000/media/images/paris.2e16d0ba.fill-100x100.jpg",
                "width": 100,
                "height": 100,
                "alt": "paris"
            }
        }
    ],
    "other_exhibits": [
        {
            "id": 1,
            "meta": {
                "type": "exhibit.ExhibitsOrderable"
            },
            "title": "The Politics of ZOOM",
            "cover_image": null,
            "authors": [
                {
                    "name": "Leslie Paris",
                    "image": {
                        "url": "/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "full_url": "http://localhost:8000/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "width": 100,
                        "height": 100,
                        "alt": "paris"
                    }
                }
            ]
        },
        {
            "id": 2,
            "meta": {
                "type": "exhibit.ExhibitsOrderable"
            },
            "title": "Innovations in Children’s Public Television Programming",
            "cover_image": null,
            "authors": [
                {
                    "name": "Leslie Paris",
                    "image": {
                        "url": "/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "full_url": "http://localhost:8000/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "width": 100,
                        "height": 100,
                        "alt": "paris"
                    }
                }
            ]
        },
        {
            "id": 3,
            "meta": {
                "type": "exhibit.ExhibitsOrderable"
            },
            "title": "ZOOM (1972-1978): Children’s Community and Public Television in the 1970s",
            "cover_image": {
                "url": "/media/images/zoom_card_Cornrowing_D01848.2e16d0ba.fill-320x100.png",
                "full_url": "http://localhost:8000/media/images/zoom_card_Cornrowing_D01848.2e16d0ba.fill-320x100.png",
                "width": 320,
                "height": 100,
                "alt": "Zoom_mainimage"
            },
            "authors": [
                {
                    "name": "Leslie Paris",
                    "image": {
                        "url": "/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "full_url": "http://localhost:8000/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "width": 100,
                        "height": 100,
                        "alt": "paris"
                    }
                }
            ]
        }
    ]
}
@mrharpo mrharpo added bug 🐛 Something isn't working maintenance 🔧 Updates and upgrades labels Sep 29, 2022
@mrharpo mrharpo added this to the v0.3.0 Collections 🖼️ milestone Sep 29, 2022
@mrharpo mrharpo self-assigned this Sep 29, 2022
@mrharpo
Copy link
Contributor Author

mrharpo commented Sep 30, 2022

After a day of playing around with it, I have a partial solution:

[Model]_id

I can't find the documentation for it, and I don't remember how I stumbled on it, but:

AuthorsOrderable

Including APIField('author_id') in the orderable 🪄 magically gives the correct answer, even without an author_id property

    "authors": [
        {
            "id": 3,
            "meta": {
                "type": "authors.AuthorsOrderable"
            },
            "author_id": 1,
            "name": "Leslie Paris",
            "image": {
                "url": "/media/images/paris.2e16d0ba.fill-100x100.jpg",
                "full_url": "http://localhost:8000/media/images/paris.2e16d0ba.fill-100x100.jpg",
                "width": 100,
                "height": 100,
                "alt": "paris"
            }
        }
    ]

And the same for exhibit_id in the ExhibitOrderable.

This is acceptable, but it would be nicer to return "id" of the foriegn key. We don't ever need the of the object in the orderable, especially since the order is contained within the order of the list. But all my attempts have been unsuccessful, and I can't find any documentation on it specifically

Bug

Without the AuthorSerializer on the other_exhibits ExhibitOrderable, I get:

TypeError at /api/v2/exhibit/6/
Object of type DeferringRelatedManager is not JSON serializable

But it clearly can be serialized correctly by the ExhibitPage.api_fields as APIField('authors')

Is this an upstream bug on wagtail's Orderable class?

AuthorSerializer

The AuthorSerializer can use the same _id trick, but it requires the property to be defined as a PrimaryKeyRelatedField:

class AuthorSerializer(ModelSerializer):
    image = ImageRenditionField('fill-100x100')
    author_id = PrimaryKeyRelatedField(read_only=True)

This yields the expected object:

            "authors": [
                {
                    "author_id": 1,
                    "name": "Leslie Paris",
                    "image": {
                        "url": "/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "full_url": "http://localhost:8000/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "width": 100,
                        "height": 100,
                        "alt": "paris"
                    }
                }
            ]
        }

The ExhibitOrderable is the only place we need the AuthorSerializer. If it were serializing in the same way as the ExhibitPage, we would not need the class at all.

@mrharpo
Copy link
Contributor Author

mrharpo commented Sep 30, 2022

Related commit: fb299e0

@mrharpo
Copy link
Contributor Author

mrharpo commented Oct 3, 2022

From the working fix at fb299e0:

AuthorSerializer

class AuthorSerializer(ModelSerializer):
    image = ImageRenditionField('fill-100x100')
    author_id = PrimaryKeyRelatedField(read_only=True)

    class Meta:
        model = Author
        fields = [
            'author_id',
            'name',
            'image',
        ]

Results

"authors": [
                {
                    "author_id": 1,
                    "name": "Leslie Paris",
                    "image": {
                        "url": "/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "full_url": "http://localhost:8000/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "width": 100,
                        "height": 100,
                        "alt": "paris"
                    }
                }
            ]

id

Changing author_id to id yields the orderable id:

"authors": [
                {
                    "id": 2,
                    "name": "Leslie Paris",
                    "image": {
                        "url": "/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "full_url": "http://localhost:8000/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "width": 100,
                        "height": 100,
                        "alt": "paris"
                    }
                }
            ]

Same results happen when commenting out id = PrimaryKeyRelatedField(read_only=True).

authors_id

Changing author_id to authors_id (... or anything random string) Returns nothing for the non-existant field, in addition to no "id" field.

"authors": [
                {
                    "name": "Leslie Paris",
                    "image": {
                        "url": "/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "full_url": "http://localhost:8000/media/images/paris.2e16d0ba.fill-100x100.jpg",
                        "width": 100,
                        "height": 100,
                        "alt": "paris"
                    }
                }
            ]

Other property

Addressing another author property (like author_name) Errors with:

ImproperlyConfigured at /api/v2/exhibit/6/
Field name `author_name` is not valid for model `Author`.

@afred afred closed this as completed in #64 Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working maintenance 🔧 Updates and upgrades
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant